The double pendulum is a classic example of a chaotic system - one that is deterministic yet unpredictable due to extreme sensitivity to initial conditions.
These equations of motion come from Lagrangian mechanics. The coupled nature of θ₁ and θ₂ creates the chaotic behavior - each angle depends on the other's position and velocity.
The simulation uses numerical integration to solve the coupled differential equations at each timestep.
for each frame:
a1_accel = lagrangian_eq1(θ1, θ2, ω1, ω2, g, m1, m2, L1, L2)
a2_accel = lagrangian_eq2(θ1, θ2, ω1, ω2, g, m1, m2, L1, L2)
ω1 += a1_accel × dt
ω2 += a2_accel × dt
θ1 += ω1 × dt
θ2 += ω2 × dt
x1 = L1 × sin(θ1)
y1 = L1 × cos(θ1)
x2 = x1 + L2 × sin(θ2)
y2 = y1 + L2 × cos(θ2)
The "butterfly effect" in meteorology - small atmospheric changes can lead to dramatically different weather outcomes. This is why long-term weather forecasts are inherently limited.
Stock markets exhibit chaotic behavior where small events can trigger large market movements. Understanding chaos helps in risk management.
Heart rhythms can transition between regular and chaotic states. Chaos theory helps understand and predict cardiac arrhythmias.
Non-linear vibrations in musical instruments create rich harmonic content. Understanding chaos helps design better acoustic systems.
Start the pendulum and wait until it's swinging smoothly. Then reset and start again with the EXACT same initial position. Notice how the motion eventually diverges - this is sensitivity to tiny numerical differences!
Increase gravity to maximum. Observe how the pendulum becomes more chaotic more quickly. Higher energy means faster exploration of phase space.
Watch the trail pattern. Even though motion is chaotic, notice how certain regions are visited more often than others - this hints at the underlying strange attractor.
Start with the pendulum nearly vertical (small initial angle). The motion stays regular longer. Start nearly horizontal for immediate chaos!