quadric sphere movement

hey all,

I have designed a solar system using quadric spheres (with alot of help from Mobeen I may add) and at the moment they are stationary…so how do i orbit them around the sun?

I know to use the rotate function, but i need 2 - 3 planets to move clockwise and the others counter clockwise.

I have using glTranslatef to move and position each planet so far but am willing for better ideas

thanks

You can use the glPushMatrix and glPopMatrix func. to create a hierarchy and add transform. matrices (glTranslate/glRotate/glScale) as necessary in between the push/pop matrices as given here http://salahuddin66.blogspot.com/2008/07/simple-solar-system-in-opengl.html
Some more useful links
http://www.ugcs.caltech.edu/~hammer/cs11/index.html
(look for week 2/3/4)

Hope this helps,
Mobeen