The 3D double pendulum

A double pendulum is one pendulum hanging from another. Let both arms swing in any direction and you get the double spherical pendulum: two bobs that move on spheres, one around the pivot and one around the other bob. It is a classic example of chaos in three dimensions.

A double pendulum swinging from its pivot, with the lower bob's looping trail in space and its shadow on the floor
A double pendulum swinging from its pivot, with the lower bob's looping trail in space and its shadow on the floor

From a plane to space

The classic double pendulum swings in a flat plane, and two angles describe it. Free both arms to swing in any direction and each bob needs two angles, so four in all. Each bob still keeps a fixed distance: the upper one from the pivot, the lower one from the upper bob. A pendulum let go with no sideways twist and no spin stays in its plane forever, because nothing pushes it out.

The forces

Each bob feels gravity and the pull of its arms. An arm can only pull or push along its own length, with whatever force keeps that length fixed. These forces are not known in advance; they change from moment to moment. At every step the app works out both arm forces from the condition that the arm lengths do not change, then moves the bobs with the classic fourth-order Runge–Kutta method, 600 steps per simulated second.

What stays the same

Two quantities are conserved. The total energy, kinetic plus potential, stays the same because the arms never change length, so the forces in them add or remove no energy in total. The angular momentum about the vertical through the pivot stays the same too: gravity points straight down and the pivot does not move, so nothing can twist the pendulum around the vertical axis. The readout shows both.

Steady cones

There is an orderly motion too. Tilt both arms in one vertical plane at just the right angles and turn the whole pendulum around the vertical at just the right rate, and gravity, the arm forces, and the turning balance exactly. The bobs then trace two horizontal circles forever. The Steady cone favorite starts from such a balance: with the upper arm at 35°, the lower arm sits at about 44° and the pendulum turns at about 2.7 radians per second.

Chaos and the twin

For most starts the motion is chaotic. Two pendulums that start a millimeter apart stay together for a few seconds, then the gap grows many times over every couple of seconds until the two have nothing in common. In the Butterfly effect favorite the twin starts 1 mm away and is more than a meter off within ten seconds. The rate of that growth is measured by the Lyapunov exponent.

Try it in PictorX

Open the 3D double pendulum and it is already swinging. Drag to turn the view, scroll to zoom, and pick Angled, From above, or Front under View. The Angle of Pendulum 1 and Pendulum 2 sets how far each arm is lifted, Twist turns the lower arm sideways, and Spin gives a push around the vertical. Turn on Twin to watch chaos at work, then save a PNG.

Frequently asked questions

Is the 3D double pendulum more chaotic than the flat one?

It has more room to move: four angles instead of two. Both are chaotic when they swing wide. Small swings of either stay regular and look like a mix of a few steady rhythms.

Why does the Energy readout stay at 100%?

Without Damping no energy leaves the system, and the steps are small and accurate enough that the drift stays below a thousandth of a percent over minutes.

What does Damping do?

It adds air drag that grows with speed. The swings shrink, the energy readout falls, and in the end the pendulum hangs at rest.

Does PictorX upload the simulation?

No. It runs on a canvas in your browser. Save downloads a PNG, and Edit opens that image in the PictorX editor.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Try the 3D double pendulum