Skip to main content
gamedev.net
🔒 Locked

Programming 3D Circle.....

Started by Sajjad Nov 20, 2000 at 2:09 PM 2 replies 550+ views
Original Post
Sajjad
Sajjad
Hello guys, i''m quiet a newbie in 3D Graphics, i wana rotate a circle in OpenGL, now for that i need a path for rotation, i used the equation of circle, now i think, and what i see is that it is a 2D Movement, how would i get 3D circular movement. In other words which equation of circle will yeild the z-axis coordintes which i can use in glTranslatef(....) or in any other function... Please don''t hesitate to write complex Math equations, i''m quiet good at maths. Thanks. Sajjad
Sajjad
Sajjad
Rotatef(...) isn''t working the way i want....
please if any one have, mail me a 3D Circle''s Eq.

Thank you....


LilBudyWizer
LilBudyWizer
I could be wrong but assuming your equation is x=cos(t), y=sin(t) for the circle with a constant z, then rotating around the y axis by a would be x=cos(t) * cos(a), y=sin(t) and z=cos(t) * sin(a). That is assuming a unit circle centered at the origin. With an angle a of zero you have x = cos(t), y = sin(t), z=0. With an angle a of 90 degrees you have x=0, y = sin(t), z=cos(t). Far from a proof, but I''m no math wiz.
Keys to success: Ability, ambition and opportunity.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.