Double Pendulum

Two pendulums, one swinging from the other. The motion equations are derivable from Lagrangian mechanics in five minutes. The motion itself is chaotic: two near-identical starts diverge exponentially. The most accessible demonstration of deterministic chaos — and a striking trail painting itself in real time.

θ₁ start 2.00
θ₂ start 2.50
L₂/L₁ 1.00
trail length 1200
why two pendulums make chaos
Lagrangian: L = T − V with kinetic and potential energy in terms of the two angles θ₁, θ₂ and their derivatives. The Euler-Lagrange equations are four coupled ODEs:

The right-hand sides contain sin(θ₁ − θ₂) and cos(θ₁ − θ₂) — the coupling. The system has two degrees of freedom; for energy above a threshold (when the second pendulum can swing over the top), the dynamics are topologically chaotic — sensitive dependence on initial conditions, no closed orbits, and a 4D phase-space attractor.

Click "add twin": two pendulums start with identical conditions except a 10⁻⁴ offset in θ₂. Within seconds, their paths visibly diverge. The Lyapunov exponent ≈ 0.5 — initial separations double every ~2 seconds. After 30 seconds, the two pendulums have completely uncorrelated states.

What's surprising: this is two objects, two angles, four state variables. No randomness. Just gravity + leverage + Newton. And yet — the future is effectively unpredictable past a few seconds. The classic demonstration that chaos doesn't require complexity; it just requires the right kind of nonlinear coupling.

Connections:
• Pendulum clocks: kept time by avoiding this coupling — single pendulums in linear regime
• Weather forecasting: same equations, far more variables. Lyapunov time ~5 days.
• Three-body problem in celestial mechanics: same flavor of chaos in a different equation.
• Brain activity: chaotic regimes in neuronal networks, used for computation.