Double pendulum simulator
Three double pendulums start a thousandth of a degree apart. For a few seconds they move as one; then they split and never meet again. That sensitivity to tiny differences is chaos.
Time 0.0 s · Lower arms apart by 0° · Energy drift 0
How it works
Each pendulum is two equal point masses on light 1 m rods under normal gravity, with no friction. The equations of motion are integrated with fourth-order Runge–Kutta in 1 ms steps; the energy-drift readout shows how far the total energy has moved from where it started; in our tests it stays under a millionth over 30 seconds of chaotic swinging. The tests also check that small swings follow the two textbook normal modes, ω² = (g/l)(2 ∓ √2).
With small starting angles the motion is regular and the three stay together. Start the upper arm above about 90° and they part within seconds.
Tested: energy drifts by under a millionth over 30 s of chaotic swinging at 1 ms steps, small swings follow the two normal modes ω² = (g/l)(2 ∓ √2), and starts 0.001° apart end up far apart within 20 s (packages/mechanics/test/pendulum.test.ts).
Related: Pendulum period · Kepler orbit · Projectile motion