Advertisement

test your knowledge ?

Started by October 29, 2002 07:44 AM
2 comments, last by KingOfHearts 22 years, 4 months ago
i have some question, why in the 18th tutorial from nehe about Quadrics, the movement of the box is faster then the others (quadric)object ? i make program that the idea is simple, i just make 2 sphere and i plant to move the sphere to make a circle at the screen. so now i have 2 sphere, one is at the right side and the other is at the left side. at the left one i only use simple math calculation to make the left one move circling by only using translation, and at the other one, i use rotate and translation to make the sphere move circling. Both of them is run together with the rotation speed is 1.0f degree counter clock wise, but the result is the left one is moving alot faster then the right one. In the program, for the rotation i use the same variable for the degree of rotation for both the spheres. any one can tell me, what is really going on here ??? the math formulas are only like this xpos = cos(zrotation) * r; ypos = sin(zrotation) * r; glTranslatef(xpos,ypos,zpos); r : distance between the centre of the sphere and the centre of sphere rotation the other one is glRotatef(zrotation,0.0f,0.0f,1.0f); glTranslatef(r,0.0f,zpos);
Simple!!!...

sin and cos of c++ ("math.h") are in radians and openGL in degrees....

Filami

Techno Grooves
Techno Grooves
Advertisement
thx for the answer, but still can''t someone tell me why the box is moving alot faster then the quadrics object???
think about what Filami said for a while
--------------------------------"I'm a half time coder, full time Britney Spears addict" Targhan

This topic is closed to new replies.

Advertisement