title: Realistic simulation of sphere rotation on a floor
body: <p>I'm trying to simulate a sphere rolling on a floor.
  For the simulation I'm using the good-old Papervision3D library of Flash AS3, but it actually doesn't matter, this is a pure geometry question.</p>
  
  <p>Assuming that I have a Sphere3D object to which I can set the rotationX, rotationY and rotationZ properties, How can I calculate the rotation in every axis where this sphere is rolling on the floor?</p>
  
  <p>For instance, Let's assume the sphere is in rest. Now it rolls 1 meter to the right. If I'm looking at this sphere from the top - I'll want to rotate it around the Z axis, 90 degrees.
  Then the sphere should roll "downwards" along the floor, so I'll want to rotate it around the X axis, but this problem is that in the meantime the X axis rotated itself when I rotated the sphere along the Z axis.</p>
  
  <p>How can I solve this issue?</p>
  
  <p>Thanks</p>