title: OpenGL ArcBall rotation and animation using interpolation?
body: <p>In my OpenGL application I need to use ArcBall rotation to rotate objects using mouse.</p>
  
  <p>I relized that I have to go with Quaternions after reading this article -  <a href="http://www.gamedev.net/page/resources/_/technical/math-and-physics/quaternion-powers-r1095" rel="nofollow">http://www.gamedev.net/page/resources/_/technical/math-and-physics/quaternion-powers-r1095</a></p>
  
  <p>And I found an easy to use implementation at here - <a href="http://www.codeproject.com/KB/openGL/virtualtrackball.aspx" rel="nofollow">http://www.codeproject.com/KB/openGL/virtualtrackball.aspx</a></p>
  
  <p>But my problem is I also need to animate my object between saved two status.
  That is -</p>
  
  <p>State(1)= (Postition X1,Position Y1,Position Z1, Rotation 1);</p>
  
  <p>State(2)= (Postition X2,Position Y2,Position Z2, Rotation 2);</p>
  
  <p>*These 'Rotations' are rotation matrices</p>
  
  <p>And the animation is done in n steps.</p>
  
  <p>Something like shown in this video - <a href="http://www.youtube.com/watch?v=rrUCBOlJdt4" rel="nofollow">http://www.youtube.com/watch?v=rrUCBOlJdt4</a></p>
  
  <p>If I was using 3 seperate angles for three axises(roll, pitch, yaw) I could easily interpolate the angles.
  But ,since ArcBall uses rotation Matrix , how can I interpolate the rotations between State 1 and State2 ?</p>
  
  <p>Any suggestions ?</p>