title: how to rotate a Sphere around a curve in opengl
body: <p>I want to make a simple movement animation in opengl but I'm getting stuck on moving the persons hands in such a manner that looks like it is moving its hands while moving</p>
  <p><strong>my code :</strong></p>
  <pre><code>glPushMatrix ();
  glTranslatef (0.565 * xTranslation, -0.9, DEPTH);
  glRotatef (45, 1.0, 1.0, 1.0);
  
  glRotatef (ARM_ROTATION * xTranslation, 0.1, 0.0, 0.0);
  glScalef (0.13, 0.13, 0.13);
  
  gluSphere (gluNewQuadric (), 1.0, 100, 100);
  glPopMatrix ();
  </code></pre>
  <p>I tried rotating and scaling and vise versa but nothing seems to work</p>
  <p><a href="https://i.stack.imgur.com/wJkpw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wJkpw.png" alt="first image" /></a></p>
  <p><a href="https://i.stack.imgur.com/xK7JG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xK7JG.png" alt="second image" /></a></p>