simulations

Coupled oscillators, phase locking, and the structures that emerge.

I

COUPLED PENDULUMS

Two pendulums on a shared beam. They exchange energy through the beam's lateral give and spontaneously anti-synchronize — Huygens' observation from 1665. Two coupled oscillators always reduce to a single relative-phase equation. This is the trivially solvable case.

$$\ddot{\theta}_i = -\frac{g}{\ell}\sin\theta_i + \kappa\,(\theta_j - \theta_i), \qquad T = 2\pi\sqrt{\frac{\ell}{g}}$$
Huygens' clocks — phase difference converges to π
tap to flip
$$T = 2\pi\sqrt{\frac{\ell}{g}}, \quad \Delta\theta \to \pi$$

Period set by $2\pi$, phase locks to $\pi$. Increase coupling κ to watch them lock faster. To get non-trivial dynamics, you need three.

45°
120
0.30

Adjust the amplitude to set how far each pendulum starts from vertical. Change the period by varying the pendulum length. Increase coupling to watch them lock faster. Two oscillators, one relative phase — always solvable. To get non-trivial dynamics, you need three.

II

KURAMOTO RING

$N$ oscillators on a circle, each with its own natural frequency. Below a critical coupling $K_c$, they drift independently. Above it, they coalesce — first in clusters, then globally. The order parameter $r$ measures coherence: $r = 0$ is incoherence, $r = 1$ is perfect synchrony.

$$\dot{\theta}_i = \omega_i + \frac{K}{N}\sum_{j=1}^{N}\sin(\theta_j - \theta_i), \qquad K_c = \frac{2\Delta\omega}{\pi}$$
$$r\,e^{i\psi} = \frac{1}{N}\sum_j e^{i\theta_j}, \qquad \theta_j \in [0,\,2\pi)$$
Phase circle — color = natural frequency
tap to flip
$$\dot{\theta}_i = \omega_i + \frac{K}{N}\sum_j\sin(\theta_j - \theta_i), \quad K_c = \frac{2\Delta\omega}{\pi}$$

Each dot is an oscillator on $[0, 2\pi)$. Coupling K pulls them together; past $K_c$ they lock.

Order parameter $r(t)$
tap to flip
$$r\,e^{i\psi} = \frac{1}{N}\sum_j e^{i\theta_j}, \quad \theta_j \in [0,\,2\pi)$$

$r = 0$: incoherence. $r = 1$: synchrony at $e^{i\pi}+1=0$. At critical coupling, you get Einstein.

30
0.40
1.00

The frequency spread controls the period distribution — how different the oscillators' natural periods are. The coupling is the amplitude of the interaction. At $K = 0$ they're independent; past $K_c = 2\Delta\omega/\pi$ they begin to lock. This is the framework's core dynamical system. At critical coupling $K = 1$ in the continuum limit, you get Einstein.

III

ARNOLD TONGUES

A single oscillator driven at frequency ratio $\Omega$. As driving amplitude $K$ grows, the oscillator locks into rational ratios — the Arnold tongues. Between the tongues: chaos. The winding number $W(\Omega)$ at fixed $K$ is the devil's staircase — flat at every rational, with a Cantor set of irrationals between.

$$\theta_{n+1} = \theta_n + \Omega - \frac{K}{2\pi}\sin(2\pi\,\theta_n)$$
Arnold tongues — $(\Omega, K)$ plane
tap to flip
$$\theta_{n+1} = \theta_n + \Omega - \frac{K}{2\pi}\sin(2\pi\,\theta_n)$$

Tongues indexed by the Stern-Brocot tree. Widest is $1/1$, then $1/2$, then $1/3$ and $2/3$. Drag K to watch them widen.

Devil's staircase — $W(\Omega)$ at current $K$
tap to flip
$$W = \lim_{n\to\infty}\frac{\theta_n}{2\pi\,n}$$

Flat at every rational, Cantor set between. $\Omega = 1/\varphi$ is the last to lock — the most irrational point in the staircase.

0.50
0.618

The tongues are indexed by the Stern-Brocot tree. The widest is $1/1$, then $1/2$, then $1/3$ and $2/3$. The golden ratio $\Omega = 1/\varphi$ is the last to lock — it sits at the narrowest gap, the most irrational point in the staircase. Drag K to watch tongues widen; drag Ω to trace the staircase.

IV

BOWED STRING

A bow drawn across a string. Velocity-dependent friction creates a stick-slip cycle: the contact point grips, loads, snaps free, and grips again. The limit cycle in phase space is the physical mechanism behind mode-locking. Different bow pressures select different overtones — the Arnold tongue structure made audible.

$$m\ddot{x} + \gamma\dot{x} + kx = F_N\,\mu(v_b - \dot{x}), \qquad f_0 = \frac{1}{2\pi}\sqrt{\frac{k}{m}}$$
String displacement — stick (gold) & slip (teal)
tap to flip
$$m\ddot{x} + \gamma\dot{x} + kx = F_N\,\mu, \quad f_0 = \frac{1}{2\pi}\sqrt{\frac{k}{m}}$$

The contact point grips, loads, snaps free, and grips again. Resonance at $2\pi f_0$. Increase bow pressure to deepen the stick phase.

Phase portrait — $(x, \dot{x})$
tap to flip
$$x(t) \sim \sum_n a_n \sin(2\pi n f_0\,t)$$

Sawtooth harmonics at integer multiples of $2\pi f_0$. This connects to the stick-slip framework for dark matter.

0.30
0.60
0.08

Increase bow pressure to deepen the stick phase. Increase bow speed to change the oscillation period. With low damping, the limit cycle is wide and sawtooth-like — the classic Helmholtz motion of a bowed string. This connects directly to the stick-slip framework for dark matter.

V

STERN-BROCOT GEARS

Two meshing gears must turn at a rational ratio $p/q$. Given a target ratio, the Stern-Brocot tree finds the simplest fraction that approximates it — the same algorithm clockmakers used for centuries. Each left/right decision in the tree is a mediant operation.

$$\text{mediant}\!\left(\frac{a}{b},\,\frac{c}{d}\right) = \frac{a+c}{b+d}, \qquad \phi = 2\pi\,\frac{p}{q}$$
Meshing gears at ratio $p/q$
tap to flip
$$\frac{\phi_1}{\phi_2} = \frac{p}{q}, \quad \phi = 2\pi\,\frac{p}{q}$$

One full turn is $2\pi$. Two meshing gears lock at rational fractions of it. The mediant $\frac{a+c}{b+d}$ finds the simplest such fraction.

Stern-Brocot tree — search path
tap to flip
$$e^{2\pi i/\varphi} \;\text{— never locks}$$

Each L/R decision is a mediant. At $1/\varphi$, the path alternates L-R-L-R forever: $[0; 1, 1, 1, \ldots]$, the slowest convergence from the oscillations page.

0.618
10

Slide the target ratio continuously from 0 to 1. The gears snap to the nearest realizable rational at each tree depth. Increase max denominator for finer precision — more teeth, closer approximation. The search path shows L/R decisions down the tree. At $1/\varphi$, the path alternates L-R-L-R forever: the continued fraction $[0; 1, 1, 1, \ldots]$, the slowest convergence from the oscillations page.