Loading the engineShared by all simulations, so the next one opens instantly.
The physics

Fireflies along a riverbank flash in unison, pacemaker cells in the heart fire together, and the audience of a concert sometimes falls into one rhythm of applause. Each of these is a population of oscillators with slightly different natural frequencies that pull on each other. Arthur Winfree saw in 1967 that such a population can synchronize suddenly once the coupling passes a threshold, and Yoshiki Kuramoto turned this into a model that can be solved exactly (1975). Steven Strogatz tells the story in Sync (2003) and reviews the mathematics in Physica D 143, 1 (2000).

What you see

N=500 oscillators on a circle, each at its current phase θi. The distance from the center grows with the oscillator’s natural frequency ωi, slow ones inside, fast ones outside, so the circle is really a band. Green dots are locked: the mean field holds them at a fixed phase. Gray dots drift: they are too fast or too slow to be held and keep lapping the others. The white arrow is the order parameter reiψ, the average of all eiθj: its length r is 0 when the phases are spread evenly and 1 when they all agree. The readout compares r with Kuramoto’s exact value for infinitely many oscillators.

The locked oscillators form a tilted arc: an oscillator with natural frequency ωi sits at the angle arcsin⁡(ωi/Kr) from the mean phase, ahead of it if it is fast and behind if it is slow, so the arc ends where |ωi|=Kr.

Equations

θ˙i=ωi+KN∑j=1Nsin⁡(θj−θi)=ωi+Krsin⁡(ψ−θi),reiψ=1N∑j=1Neiθj.

The second form is Kuramoto’s key step: every oscillator feels only the mean field, with a pull proportional to r. A stronger mean field locks more oscillators, which makes the mean field stronger still. For natural frequencies drawn from a Lorentzian of half-width γ this feedback has a closed solution: r=0 below the critical coupling Kc=2γ and

r=1−Kc/K

above it. The transition is continuous, like the magnetization of a ferromagnet at its Curie point, with r growing as the square root of the distance from Kc.

The natural frequencies are the quantiles of the Lorentzian, ωi=γtan(π(i+1/2)/N−π/2), so the distribution is the same on every run and exactly symmetric, and the locked arc stands still instead of turning with a random mean frequency. The phases start uniformly at random. The equations are integrated with fourth-order Runge-Kutta at a step of 0.02, two steps per frame.

Presets

Locked: K=4, twice the critical coupling. Within about 10 time units (4 seconds) r rises to the exact value 1/2≈0.71; with 2000 oscillators the measured average stays within 0.03 of it, as it does for K=3 and K=6.

Just above the threshold: K=2.5, where the exact value is r≈0.45. About half of the oscillators lock, and near the threshold everything is slow: the arc takes much longer to form and r wanders more.

Incoherent: K=1, half the critical coupling. No arc forms and r stays at the level of chance, about 1/N, below 0.08 with 2000 oscillators.

Strong coupling: K=10, r≈0.89. Most oscillators lock into a tight arc; only the far tails of the Lorentzian still drift.

Parameters

Coupling K: 0 to 10 (default 4). Applies immediately, so moving it across Kc during a run shows the arc forming or dissolving.

Frequency spread γ: the half-width of the Lorentzian, 0.1 to 5 (default 1). It sets Kc=2γ. Changing it restarts the run.

Oscillators N: 10 to 2000 (default 500). With few oscillators r fluctuates strongly and the threshold is blurred; the exact result holds for N→∞. Changing it restarts the run.

Time step dt: 0.002 to 0.1 (default 0.02).