how to make two gear turn in 360 degree ?

I need to make two of the gear turn at teh same time.I suppose to turn in clockwise and another one suppose to turn in anti-clock wise.
I know it sound confusing but I really hope that sombody can understand my question and provide my some idea on it.
Really out of idea.Thanks

It is very simple, to make two gears move like they would in the real work, the code should look something like this:

glPushMatrix(); // Gear 1

glTranslate(…); // Move to location on screen
glRotatef( gear_rotation_1, 0, 0, 1); // Rotate gear

DrawGear();

glPopMatrix();

glPushMatrix(); // Gear 2

glTranslate(…); // Move to location on screen
glRotatef( gear_rotation_2, 0, 0, 1); // Rotate gear

DrawGear();

glPopMatrix();

Note some extra code is needed, but hope it gives up an idea…

Originally posted by Claudee:
I need to make two of the gear turn at teh same time.I suppose to turn in clockwise and another one suppose to turn in anti-clock wise.
I know it sound confusing but I really hope that sombody can understand my question and provide my some idea on it.
Really out of idea.Thanks

For the very last time: Mail me and i’ll give you an example program i wrote for this problem.

Ciao,

Niftybitz.