🇺🇦 Українська

🌀 Triple Pendulum — Extreme Chaos

Three pendulums connected in series form a 3-degree-of-freedom chaotic system. Even a difference of 0.0001 rad in the initial angle leads to completely different trajectories within seconds — the defining signature of chaos. Uses RK4 integration of the full Lagrangian equations of motion.

Masses (kg)

Lengths (m)

Initial Conditions

Display

Stats

Energy E
ΔE drift0.00%
Divergence
Time0.0 s

Physics

A triple pendulum has 3 degrees of freedom (angles θ₁, θ₂, θ₃). The equations of motion are derived from the Lagrangian L = T − V, where T is kinetic energy and V is potential energy. The result is a coupled system of 3 nonlinear second-order ODEs. This simulation integrates them with a 4th-order Runge-Kutta (RK4) method with fixed timestep Δt = 1 ms for accuracy.

Energy should be conserved (E = const). Any visible drift is integration error — smaller Δt gives better conservation. The Lyapunov exponent λ > 0 quantifies how fast nearby trajectories diverge: |δ(t)| ≈ |δ₀|·e^(λt). For a triple pendulum λ ≈ 3–7 s⁻¹, much larger than a double pendulum.

vs. Double Pendulum

A double pendulum (2 DOF) is the classic chaos demonstration. The triple pendulum (3 DOF) is even more chaotic: longer Lyapunov exponent, richer attractor structure, and the bob-3 trail almost immediately appears fully random. This makes it ideal for visualising the butterfly effect.

Key facts

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.