Firefly Flashing Dynamics (2D)
A pulse-coupled oscillator model of firefly synchronization: each firefly flashes on its own rhythm, but every flash nudges nearby fireflies closer to firing too — watch independent blinking lock into a shared pulse.
This 2D companion swaps the 3D version's decorative night-forest scene for the actual mechanic behind real firefly flashing: a pulse-coupled oscillator model. Each firefly ticks toward its own flash threshold at its own natural rate; when it fires, every firefly within the coupling radius gets pulled a step closer to firing too. Turn coupling strength up and a field of independently blinking fireflies locks into a shared pulse within seconds — the same synchronization behavior studied in Southeast Asian firefly swarms.
Mirollo–Strogatz-style pulse coupling: on each firing event, phasei += K·(1−phasei) for every neighbour within the coupling radius. A live Kuramoto order parameter r = |Σeiθ|/N tracks how synchronized the population is.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install