pi / 180 or something?

SDittmar

Member
Joined
Feb 9, 2003
Messages
11
I want to understand 3d graphics and directx. ive read so many tutorials but I always get stuck when i get to the geometry part.

Say a rotating cube, I always see something like pi / 180. I dont understand this concept. Please someone explain to me what makes the cube rotates (using directx7/8/9 or gdi+)
thanx
 
ok, so the pi/180 is merely conversion from degrees to radians. What about Sine and Cosine, are these what increment the rotating cube?

And what is an alpha degree?

thanx for replying
 
ok alpha is only the name of the variable that contains the angle value in degrees, it just a name. Sin and Cos functions are used when you try to rotate an object without using the rotate methods provided by directx or opengl libraries.

Here are the formulas to rotate any 3d point by the brute force method.

x=z*sin(yaw)+x*cos(yaw)
y=y
z=z*cos(yaw)-x*sin(yaw)

x"=x
y"=y*cos(pitch)-z*sin(pitch)
z"=y*sin(pitch)+z*cos(pitch)

x"=y"*sin(roll)+x"*cos(roll)
y"=y"*cos(roll)-x"*sin(roll)
z"=z"
 
could you explain these formulas a little further? what are the apostrophes for? And yaw, pitch, and roll?
thanx
 
There are whole books devoted to mathematics in 3D space, some specifically target towards game programming. It would probably be well worth to money to purchase one.
 
do you have a recommendation? i dont know much geometry, so id like something that will teach geometry specific to computer graphics.
thanx
 
What level of school are you, SDittmar? In the US they cover Trig somewhere between 8th and 10th grade, usually (if I remember right). If you havent gotten that far yet, you may have a tough time picking it up - but feel to go to your librarian and ask for a book. Many graphics, unfortunately, either dont cover the basics very well or go into pure-formula mode. Id stick with a math book for now, to pick up the basics of Cos, Sin, Tan, etc.

-nerseus
 
Just about the defacto base knowledge book on computer graphics is : "Computer Graphics: Principles and Practice in C" by Foley, Van Dam et al...

Here are link to it at Amazon
 
Back
Top