Results 1 to 3 of 3

Thread: how to make two gear turn in 360 degree ?

  1. #1
    Guest

    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

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: how to make two gear turn in 360 degree ?

    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

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2002
    Posts
    18

    Re: how to make two gear turn in 360 degree ?

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

    Ciao,

    Niftybitz.

Similar Threads

  1. noob question: want to use splines to draw a gear
    By newsb in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-29-2011, 12:44 PM
  2. Developer search for OpenSource Game Engine GEAR
    By devildeath in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 09-17-2010, 10:54 AM
  3. Draw GEAR(HELP!!!!!!!!!!!!!!!! )
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-09-2002, 06:29 AM
  4. NURBS degree ?
    By in forum OpenGL: User Software
    Replies: 2
    Last Post: 09-13-2001, 05:07 PM
  5. Replies: 6
    Last Post: 10-09-2000, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean