This is the 2D side-view companion to the 3D "Pendulum Wave" apparatus. Each of the N pendulums is an independent physical body: every animation frame numerically integrates its own equation of motion
theta_n''(t) = -(g / L_n) * sin(theta_n(t))
with RK4 sub-stepping (8 steps/frame) — nothing about a pendulum's angle is looked up from a formula at draw time; it is the running state of that integration. Only the lengths are chosen in advance, from the classic pendulum-wave design rule: pendulum n should complete exactly (30 + n) full oscillations in one fixed cycle time T, so
T_n = T / (30 + n)
L_n = g * T_n^2 / (4*pi^2)
Because every pendulum then swings under its own real dynamics at a slightly different natural frequency, they drift out of phase after release, sweep through travelling waves, snake-like ripples and apparently chaotic scatter, then land back in a single in-phase line the instant the full cycle T elapses — a genuine emergent re-synchronization, not a scripted loop.
- Exact ODE toggles between the true nonlinear pendulum equation (sin theta — periods depend slightly on amplitude, so wide swings drift the resync a touch, exactly like a real apparatus) and the small-angle idealization (sin theta ≈ theta) used for the length design formula itself.
- Release angle — push it past ~40° to see the exact ODE visibly diverge from the idealized case: real pendulums swing measurably slower than small-angle theory predicts at large amplitude.
- Pendulum count / Full-cycle time — more pendulums pack more visible wave detail into the row; a longer cycle stretches the whole sequence out.
Real-world relevance: physical pendulum-wave machines are a staple physics-museum demonstration; the same beating-frequency principle governs the shimmer of overtones in a piano string and the drift between two nearly-tuned metronomes.