Silicon Logic
SL · 08 · Pendulum
§ 08 · Sandbox · Mechanics & chaos Filed 2026.05

One bob is a clock. Two is weather. Three is a signature.

Grab any bob and drag it to set the starting angles. Release and watch. A single pendulum keeps the same time forever; a double one forgets where it came from after a few swings; a triple one writes a different sentence every time you ask. Same equations, same code path — only the number of links changes.

Mode   Single Integrator   RK4 · 240 Hz Energy  
θ₁   θ₂   θ₃  
drag  any bob  ·  release  to let it swing  ·  trails build on the tip
Gravity · g
980
Damping
0.00
Trail persistence
22
Time warp
1.00×
Sandbox
Show
Lengths & masses
L₁200
m₁1.00
L₂180
m₂1.00
L₃140
m₃0.60

What you are looking at

§ 08 · Reading
I
A single pendulum. For a small swing the period is 2π√(L/g) — independent of mass, independent of amplitude. Pull it out wider and the period grows, slowly. This is the small-angle approximation showing where it breaks.
II
A double pendulum is deterministic but chaotic. Repeat the same release twice — even to a millionth of a radian — and the two trajectories agree, then diverge, then have nothing more to say to each other.
III
A triple pendulum is mostly here because it's beautiful. The tip writes a different signature every time, and the phase plot in the corner shows you what a non-attractor looks like — orbits that never repeat and never settle.
Add a little damping and the orbits shrink toward the origin in phase space; the bob hangs straight down again. Every interesting system, slowed down enough, looks boring.

How the simulation behaves

§ 08 · Method

One code path handles all three modes. The state is the vector of angles θ = (θ₁, …, θ_n) and their rates θ̇. From the planar Lagrangian for point bobs on massless rigid rods, the equations of motion take the matrix form M(θ)·θ̈ = −C(θ,θ̇) − G(θ) − b·θ̇ with the symmetric inertia matrix M_jk = A_jk · L_j L_k · cos(θ_j − θ_k), the Coriolis vector C_l = Σ A_lj · L_l L_j · sin(θ_l − θ_j) · θ̇_j², the gravity vector G_l = B_l · g L_l · sin(θ_l), and the suffixed mass sums A_jk = B_max(j,k) = Σ_{i≥max(j,k)} m_i.

Each frame steps the state with classical fourth-order Runge–Kutta at a fixed substep of 1/240 s. RK4 is not symplectic, so energy will drift on very long runs at very large amplitudes — turn damping to zero and leave the triple pendulum overnight if you want to see the drift become visible. For minutes of play it is invisible.

Dragging a bob rewrites θ_i from the cursor; downstream bobs ride along on the rigid chain. On release, all velocities are zeroed — the system starts from rest at whatever pose you set. The phase-space inset plots (θ_n, θ̇_n) for the tip bob: a clean loop for the single pendulum, a tangle for the double, a thicket for the triple.