The angular momentum of a rigid body with angular velocity is given by , where is the inertia tensor. This Demonstration shows the rotation of an axially symmetric ellipsoid rotating about a fixed angular velocity vector . The body axes , , (indicated by the red, green, and blue spheres) and the angular momentum rotate as functions of time. The space axes , , are indicated by the red, green, and blue arrows. The body’s height and radiuscan be adjusted, as can the angular velocity .
The inertia tensor for a body of mass , uniformly distributed through an ellipsoid , is
; here we have set and .
This tensor is used to calculate the angular momentum in the body frame (with body axes , , fixed), which is then transformed to the space frame (with space axes , , fixed) by a rotation matrix. The inertia tensor and rotation are covered in the references below, and in the Wikipedia entry for "Moment of inertia".
 J. R. Taylor, "Rotational Motion of Rigid Bodies," Classical Mechanics, Herndon, VA: University Science Books, 2005 pp. 367–416.
 S. T. Thornton and J. B. Marion, "Dynamics of Rigid Bodies," Classical Dynamics of Particles and Systems, Pacific Grove, CA: Brooks/Cole, 2004 pp. 411–467.