##############################################################################################
   mIRC 3d Object Renderer v2 Beta 2 By Talon: irc.webchat.org 6667 on #mIRC,#Help.mIRC
##############################################################################################
Info:
	I was bored of making socket stuff like httpds, ircds, ftpds, aim clients, etc... and
decided it was time to make something new. I never done 3d art before, so i figured i would
hop on the web, get an example of how its done, and make my own. Everything about rotation
of 3d objects, I learned from...

http://www.gamedev.net/hosted/blackart/gldetut6.html

The rest, solid fill, color fading, etc... is just exparimental trial and error. My first
project was just rendering the verticies (hence the dot mode) on the screen and rotating them
with a timer. my second project was single object wireframe rendering on angles with the mouse
movement. and my third shot, is this file now, Renverer V2!
##############################################################################################
Usage:
	There are 3 object examples, and you can start any one of these three with the command

/init cube
/init diamond
/init pyramid

After you initialize one of these objects, you can right click the rendered area for a popup
menu with several choices.

You may notice down in the editbox the command /render. This is for people who want to see
the space at a certain angle, angles are from 0-359 (360 = same as 0) Format for this command
is

/render XAngle YAngle ZAngle

the angle can be greater than 360, tho it is pointless.. Lets say you use 720.. well thats two
full rotations which means its going to be back at 0.
##############################################################################################
Known Bugs:
	In this area, im going to explain some things that happen which you might consider a 
bug, and i havent worked out a way to fix it yet. This is just beta distribution.

1. Object not filling in side (no shade mode) with object behind it.

	This is caused by the renderer drawing the furthest object first, and the object face
behind the face your seeing through is the same color, thus a drawfill in the CENTER of the 
face does not happen because the color already exists there, turn shading on to solve this 
problem.

2. Object not filling when over half side is off the viewing plane.

	Again this is caused because the avgx and avgy (center of the face) is off the screen
which makes mIRC fail at the drawfill. The fix for this, maximize the window, or move the
object back so the center is at least on the viewing plane.

3. Object shading sometimes makes faces black.

	Shading is the main thing im working on right now, I havent quite perfected it and i
know there are a few bugs with it. Hopefully fixed in the next beta.

ANYTHING else you find wrong i would like to know about. You can PM me on mircscripts.org
I will NOT PUT MY EMAIL in this due to the fact i get enough spam as it is.. I dont need more
if You want to contact me, once again PM me or look for me on
irc.webchat.org 6667 #mIRC,#Help.mIRC
##############################################################################################
Making your own Objects:
	Making your own objects is pretty simple, but you must follow these instructions or
you may experiance some backface culling issues removing the wrong faces. Lets look at an
example, the simplest object, XPyramid.
alias XPyramid {
  if ($1 = verts) { return -50 50 -50;50 50 -50;-50 50 50;50 50 50;0 -50 0 }
  if ($1 = polys) { return 5 1 2 5;5 2 4 5;5 4 3 5;5 3 1 5;3 4 2 1 3 }
  if ($1 = pycol) { return 255 0 0;0 255 0;0 0 255;255 255 0;0 255 255 }
}

               5/\
               /  \
              /    \
             /      \
            /        \
          1/__________\2
         3/____________\4

verts are the verticies or some people like to call them vectors. these are the X,Y,Z Coords
away from 0,0,0 negative is left,up,back and positive right,down,forward.

polys is the definition of which verticies to play connect the dots with to make a side. lets
look at the first side 5 1 2 5 This means draw a line from 5 to 1, 1 to 2, 2 to 5, so those
three lines are making a face. in defining your faces, define in a clockwise motion the
furthest back to the last side before the back. then define any top or bottom. This is set up
for back face culling. If i defined the front face first, (5 3 4 5) your object is going to
do wierd things using my culling method lol.

pycol is the poly (or face) color definition, which is the Red Green and Blue value of the
color, each side can have its own color and MUST BE defined or else its black.

TO MAKE YOUR OWN OBJECT you alias must start with an X.
XSphere XOctagon XHexigon etc are prime examples of aliases. Follow my format for verts,
polys, and poly coloring and you should be all good, you can init your own object...
Follow the popup for defining your object within the popups for easy addition of your new
defined object.
##############################################################################################
Special Thanks to Beta Testers:

1. Tabatha
2. Trashlord
3. Basicer
4. Stealth
5. Rickie
##############################################################################################