Firefly Synchronization illustration

Firefly Synchronization

In parts of Southeast Asia thousands of fireflies blink in perfect unison, and this simulation shows how that order arises with no conductor. Each firefly is a pulse-coupled oscillator: a phase that climbs at its own natural frequency and flashes when it reaches the top, and every flash nudges the phase of nearby fireflies a little further along. Small nudges accumulate into cascades that pull the swarm into step. Turn the coupling strength up from zero and the meadow shifts from random twinkling, through travelling waves of light, to a single flashing heartbeat. Sliders set the coupling radius, the number of fireflies and the spread of their natural frequencies, while glowing sprites drift over a dark treeline. A rolling plot of the Kuramoto order parameter r tracks how synchronised the swarm is, from 0 (chaos) to 1 (full unison).

Runs 100% in your browser — simulations are computed locally on your device.

Notes

  • Mirollo and Strogatz proved in 1990 that a population of identical integrate-and-fire oscillators, each pulling its neighbours forward when it fires, synchronises from almost any starting condition.
  • The order parameter r measures coherence: it stays near 0 when phases are scattered and climbs to 1 when every oscillator flashes together, the same quantity used in the Kuramoto model of coupled oscillators.
  • Firefly synchrony was documented in Pteroptyx species by John and Elisabeth Buck; whether it locks depends on the race between coupling strength and the spread of individual flash frequencies.
  • Runs 100% in your browser — simulations are computed locally on your device.