Spherical pendulum (source code)

= Spherical pendulum
{title2=$L=\frac12mr^2(\dot\theta^2+\sin^2\theta\dot\phi^2)+mgr\cos\theta$}
{wiki}

A <point mass> constrained to a fixed <distance> $r$ from a pivot and free to move in three dimensions under uniform <gravitational acceleration>. With the vertical axis downward and <polar angle> $\theta$ measured from it, the <Lagrangian> is the expression in the title. The <azimuth> $\phi$ is a <cyclic coordinate>, so $mr^2\sin^2\theta\dot\phi$ is conserved <angular momentum> about the vertical axis. A rigid massless rod enforces the constraint without the loss-of-tension limitation of a string.