Double Pendulum Chaos Lab
An interactive double-pendulum simulator that integrates the real equations of motion with RK4 — drag the bobs to set a start, watch the chaotic trail, and add a near-identical "ghost" pendulum to see sensitive dependence on initial conditions in action.
How to Use
- Press Play to start the simulation — the upper rod swings from the pivot and the lower rod whips around chaotically.
- Drag bob 1 or bob 2 with the mouse to set the starting angles; the sim pauses and zeroes the velocities while you drag, then press Play to release.
- Use the sliders to change gravity, the two rod lengths, and the two bob masses, then Reset to apply a clean start.
- Click "Add ghost" to spawn a second pendulum offset by just 0.001 radian — watch the two diverge to show chaos.
- Toggle "Show trail" to draw the fading path of the lower bob, and use "Clear trails" to wipe it.
What you are watching
A double pendulum is just two rods: the first hangs from a fixed pivot, and the second hangs from the tip of the first. Each is free to swing. That tiny bit of extra freedom turns an utterly ordinary toy into one of the most-studied examples of deterministic chaos. The motion is fully determined by the equations of physics — nothing random happens — yet the result is wild, intricate, and effectively impossible to predict far ahead.
Press Play and the lower bob whips around, never quite repeating. Press Add ghost and a second pendulum starts from an angle that differs by only 0.001 radian — a difference you could never reproduce by hand. For a while the two move as one; then they peel apart and swing completely differently. That divergence is the signature of sensitive dependence on initial conditions.
Under the hood
The simulation integrates the exact double-pendulum equations of motion. The angular accelerations depend on both angles, both angular velocities, the two masses, the two lengths, and gravity:
RK4 samples the slope four times per step and blends them, which keeps an energy-conserving, stiff system like this stable far longer than a naive Euler step would. The model is frictionless and idealized, so it never damps out — a real pendulum slowly loses energy and stops.
Quick reference
About the Double Pendulum Chaos Lab
The Double Pendulum Chaos Lab is a free tool for science and engineering work. It runs right in your web browser, so there is nothing to download. An interactive double-pendulum simulator that integrates the real equations of motion with RK4 — drag the bobs to set a start, watch the chaotic trail, and add a near-identical "ghost" pendulum to see sensitive dependence on initial conditions in action.
How it works
Enter what you have and read the result as it updates live. It all runs on your own device, so it is quick and private, with nothing to install.
Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.
Frequently Asked Questions
What is a double pendulum?
A double pendulum is a pendulum with a second pendulum attached to the end of the first. Each rod can swing freely, so the system has two angles and two angular velocities. Despite being built from two simple parts, its motion is governed by coupled non-linear differential equations and is one of the simplest physical systems that behaves chaotically.
What is chaos / sensitive dependence on initial conditions?
Chaos means the system's future is fully determined by its starting state, yet two starts that differ by an immeasurably tiny amount drift apart exponentially fast. Click "Add ghost" to launch a pendulum offset by only 0.001 radian: for a while it tracks the original, then suddenly the two swing completely differently. That is sensitive dependence on initial conditions — the reason long-range prediction is impossible even though the math is deterministic.
What do the trails show?
The trail is the path traced by the tip of the lower bob over the last few seconds, drawn in the accent color and fading from solid to transparent as it ages. Because the lower bob moves chaotically, the trail fills the plane with intricate, never-repeating loops — a visual fingerprint of the motion that makes the chaos easy to see.
Is the simulation accurate?
It integrates the standard exact double-pendulum equations of motion using a fourth-order Runge–Kutta (RK4) scheme with a small fixed time step, run in several sub-steps per frame for stability — far more accurate than the simple Euler method. It models an idealized frictionless system, so it never loses energy and swings forever; a real pendulum slowly damps out. Over long runs tiny numerical error still accumulates, which is itself a hallmark of chaos.
Does this run locally in my browser?
Yes. The entire simulation — physics, integration, and rendering on the canvas — runs in JavaScript on your device. Nothing is uploaded, no server is contacted, and it keeps working offline once the page has loaded.
How do I use the Double Pendulum Chaos Lab?
Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Is it free? Does it work without internet?
Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.
Where does my data go?
Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.
Common Use Cases
Teaching chaos theory
Demonstrate sensitive dependence on initial conditions live in a classroom by launching a ghost pendulum and watching two near-identical starts diverge.
Visualizing non-linear dynamics
See coupled non-linear ODEs come to life and connect the equations of motion to the motion you actually observe.
Exploring parameter effects
Sweep gravity, rod lengths, and masses to build intuition for how each parameter reshapes the swinging behavior.
Numerical-methods demo
Show why a good integrator (RK4) matters for stiff, energy-conserving systems versus a naive Euler step.
Generative art & trails
Capture the mesmerizing, never-repeating curves the lower bob traces as a piece of math-driven visual art.
Last updated: