The physics of a ball rolling inside a cylinder is worked out in
the paper by Gualtieri et al; they analyze the various forces
involved, notably a Coriolis torque that acts around the -axis.
A physical demonstration of the process is described in the
paper by Matsuura. We enhanced the work of Gualtieri et al by
allowing an initial spinning -axis. This matches the behavior of
a golf ball, which would be spinning at a rate proportional to
its speed as it falls into the cup (see second snapshot).
Solving the differential equations yields a formula of the form
. But in order to learn where points are at time requires the
numerical solution of a differential equation so that the
angular velocity at each instant is as it should be. The angular
velocity is computed from by the following equation, where is
the radius of the ball, is the radius of the cylinder, and is a
constant that represents the (negative of) the angular speed of
the ball around the central axis of the cylinder: . Note that is
a linear function of