...
running...
How to use
Pick a preset, then change spin rate, tilt, mass and geometry. With precession set to 0 the top is released at rest and nutates, tracing loops or cusps in the top view; at 1.00 it starts in exact steady precession and the tip traces a circle. Use Tap to disturb the tilt. With friction on the spin slows, the top becomes unstable below the critical spin and falls.
The science
Model. A symmetric top pivots at a fixed point. Its axis has tilt theta from the vertical and azimuth phi; the rotor spins at w3 about the axis. With moments I3 (about the axis) and I1 (about the pivot, perpendicular), centre of mass at distance l, the Euler equations give:
I1 theta'' = I1 phi'2 sin(theta) cos(theta) - I3 w3 phi' sin(theta) + m g l sin(theta)
d/dt [ I1 phi' sin2(theta) + I3 w3 cos(theta) ] = 0, w3 = psi' + phi' cos(theta)
Conserved quantities. Without friction the energy E = I1 (theta'2 + phi'2 sin2 theta)/2 + I3 w3^2/2 + m g l cos(theta), the vertical angular momentum p_phi and the spin w3 are constant; the checks monitor them.
Steady precession. At constant tilt I1 cos(theta) phi'2 - I3 w3 phi' + m g l = 0. For a fast top the slow root is phi' = m g l / (I3 w3): the gravity torque changes the direction, not the size, of the angular momentum, so the top turns instead of falling.
Nutation and sleeping. A top released at rest bobs between turning points of theta (nutation). A vertical top is stable only if I3 w3 > 2 sqrt(I1 m g l): below that spin the sleeping top wobbles and falls. Friction lowers w3 until that threshold is crossed.
Simplifications. Disc-like rotor with I3 = m R2/2 and I1 = m R2/4 + m l2, no table friction or tip rolling, rigid body, axial spin friction only, simulation stops at 85 degrees tilt. Integration is RK4 at 1 ms.