🌀 Triple Pendulum
Interactive triple pendulum simulation with RK4 integration. Watch multiple pendulums with tiny differences in initial angle diverge exponentially — the hallmark of extreme chaos. Adjust masses, lengths, and see Lyapunov divergence live.
About this simulation
This simulation runs five identical triple pendulums side by side, each starting with the angle θ₁ offset from the others by as little as 1×10⁻⁴ radians. The full Lagrangian equations of motion for the 3-link chain are solved exactly (a 3×3 mass matrix inverted every step via Gaussian elimination) and advanced with 4th-order Runge-Kutta at Δt = 1 ms. Watch how those near-identical starting conditions rapidly explode into completely unrelated trajectories — a direct visualisation of the Lyapunov exponent that defines chaos.
🔬 What it shows
Sensitive dependence on initial conditions: five pendulums launched almost identically end up in wildly different configurations within a few seconds, because the triple pendulum's 6-dimensional phase space has a Lyapunov exponent roughly double that of a double pendulum.
🎮 How to use
Adjust the masses m₁-m₃ and lengths L₁-L₃, set the initial angle θ₁ start and gravity g, and toggle All variants / Trails to compare how the five colour-coded pendulums diverge; watch the live Energy, ΔE drift, and Divergence stats, and use Pause [P] / Reset [R] to freeze or restart the run.
💡 Did you know?
Adding just one extra link to a double pendulum roughly doubles its Lyapunov exponent (from about 1-3 s⁻¹ to 3-8 s⁻¹ here), meaning a triple pendulum forgets its starting condition and becomes unpredictable in only a fraction of the time.
Frequently asked questions
What makes a triple pendulum chaotic?
Its three coupled nonlinear equations of motion have no closed-form solution and are extremely sensitive to initial conditions, so trajectories that start almost identically diverge exponentially fast, which is the defining signature of deterministic chaos.
What does the Lyapunov exponent λ mean here?
λ measures how fast nearby trajectories separate over time via |δ(t)| ≈ |δ₀|·e^(λt); for this triple pendulum λ is roughly 3-8 s⁻¹, meaning an initial difference of 10⁻⁴ rad grows by a factor of e in well under a second.
Why does the ΔE drift stat matter?
The true physical energy of an undriven pendulum should stay constant, so any visible ΔE drift reflects numerical integration error rather than real physics — a smaller timestep Δt would reduce that drift.
Why does the simulation track five pendulums instead of one?
A single pendulum can't show sensitivity to initial conditions on its own — you need at least two nearly-identical runs to see them separate, and five with a rainbow reference trail makes the divergence dramatically visible.
How is this different from a double pendulum?
Adding a third rigid link increases the degrees of freedom from 2 to 3 and roughly doubles the Lyapunov exponent, so the triple pendulum's third bob appears to move almost randomly almost immediately, making it an even sharper demonstration of the butterfly effect.
Three pendulums connected in series reveal extreme chaos: launch 5 variants with a 0.0001 radian difference and watch them diverge within seconds. RK4 integration, rainbow trails.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install