Write the Lagrangian (kinetic minus potential) in the link angles, apply Euler–Lagrange, and solve the matrix equation for the angular accelerations at each instant.
Four evaluations per step, blended: energy stays conserved to about one part in ten million over ten seconds, even for the triple pendulum.
One link has one degree of freedom and stays predictable forever. Two coupled nonlinear ones is the minimum recipe for sensitive dependence.
Real quadratic drag as a torque on each bob, with air density drifting about ±5%. Turn it off for the idealised, energy-conserving system.
A single pendulum has one degree of freedom, its angle, confined to a simple repeating orbit in phase space. A double pendulum has two, coupled: the minimum recipe for chaos. A third link does not change the qualitative behaviour, just deepens it.
The hallmark of chaos: two nearly identical starting angles, a fraction of a degree apart, produce motion that looks the same for a moment then diverges completely. That is not the simulation losing accuracy: it is the real, mathematical behaviour. Genuinely chaotic in the technical sense: deterministic, but two runs a hair’s width apart diverge exponentially.
Even in the most chaotic swing, total mechanical energy stays essentially fixed (with air resistance off): what is wildly unpredictable is where that fixed energy ends up distributed at any moment.
A real double pendulum is also chaotic, but tiny imperfections (bearing friction, air currents, a barely-perfect release) make it diverge from any prediction within moments: which is why this is simulated rather than measured by hand. A cruder integrator would leak or gain energy every step and the “physics” would stop being physics; the energy check confirms RK4 does not.
Bob area comes from its mass on a constant-density-sphere assumption, so a heavier bob presents more area but proportionally far less drag per unit mass; the drifting air density stops two identical-looking runs tracking each other. The pivots stay frictionless and the rods massless. Turn drag off to see the difference between a chaotic system and a merely complicated one.
Genuinely chaotic in the technical sense: deterministic (the same starting state always produces the same motion) but with extreme sensitivity to initial conditions. Two runs starting a hair's width apart diverge exponentially — that's the formal definition, not just a figure of speech.
A single pendulum has only one degree of freedom — its motion is confined to a simple, repeating orbit in phase space. Chaos needs at least two coupled, nonlinear degrees of freedom to appear; one link alone can't generate it, no matter how far you swing it.
A cruder method (like simple Euler integration) leaks or gains energy every step — over a chaotic simulation that error compounds fast and the "physics" stops being physics. RK4 evaluates the motion at four points per step and blends them, keeping energy essentially constant over long runs, which is exactly what the energy-conservation check above confirms.
Air resistance is on by default — the checkbox above the animation — and it is real quadratic drag, entered as a generalised torque on each bob alongside gravity rather than as a damping fudge applied to the output. Bob area comes from its mass on a constant-density-sphere assumption, so a heavier bob presents more area but proportionally far less drag per unit of mass. The air density itself drifts by about ±5% on a slow cycle, which is what stops two identical-looking runs from tracking each other.
The pivots are still frictionless and the rods still massless. Turn air resistance off and you get the idealised system: nothing removes energy, the pendulum never settles, and the energy-conservation figure quoted below holds. That is the switch worth flicking to see the difference between a chaotic system and a merely complicated one.
Releases in which this page changed, newest last. Derived from the archived copy of every release, not from notes written afterwards — so it reflects what actually shipped. Site-wide passes are left out; they are in the full changelog.