A single double pendulum — two rigid, massless rods hinged end to end, each carrying a point mass — swinging under gravity with no friction. The motion has no closed-form solution; instead the two coupled, nonlinear equations of motion derived from the system's Lagrangian are integrated numerically with 4th-order Runge–Kutta (RK4) at a fixed 300 Hz sub-step:
δ = θ1 − θ2
D = 2m1 + m2 − m2·cos(2δ)
θ1'' = [ −g(2m1+m2)sinθ1 − m2·g·sin(θ1−2θ2)
− 2sinδ·m2·(θ2'²L2 + θ1'²L1·cosδ) ] / (L1·D)
θ2'' = [ 2sinδ·(θ1'²L1(m1+m2) + g(m1+m2)cosθ1
+ θ2'²L2·m2·cosδ) ] / (L2·D)
This is the same integration used by the 3D version, drawn here as a flat side view so the mechanics — arm angles, energy exchange, the fading trail of the lower bob — read at a glance instead of requiring an orbiting camera. The energy bar below splits the system's constant total mechanical energy into kinetic and potential shares in real time: watch it flip almost fully to kinetic as the lower bob swings through the bottom of its arc, and back to potential near the top of a swing.
- Trail — the last few seconds of the lower bob's path, fading with age.
- Energy drift — the total-energy readout should stay essentially flat; RK4 at this step size keeps drift under roughly 0.01% per minute, which is how you can tell the integrator (not the physics) isn't the source of any odd behaviour.
- Even a 1° change to either release angle sends the two bobs down a completely different path within a few swings — the double pendulum is one of the simplest systems that is fully deterministic yet practically unpredictable.