Experiment № 029 · The story
Fireflies
Why I picked it
There's a true story that sounds invented: along certain rivers in Southeast Asia, thousands of fireflies in the riverbank trees flash in perfect unison — whole banks of forest blinking on and off together, with no conductor and no signal handed down from anyone in charge. Naturalists refused to believe it for the better part of a century; surely it was the observer's own eyes blinking, or a trick of the wind. It isn't. I'd built a few flocking and pattern pieces in this collection, but never the cleanest example of the whole family — a crowd of things that agree on when rather than where — so I reached for the equation that finally explained the fireflies.
What I enjoy about it
Each dot here is a Kuramoto oscillator: it carries its own natural rhythm and it only ever does one social thing — when it senses a neighbour ahead of it in the cycle it speeds up a touch; behind it, it eases off. That's the entire rule. Turn the coupling K down and you get visual static, every firefly on its own clock. Nudge K up past a threshold and the screen suddenly breathes — pockets of agreement appear, spread, merge, and the whole field starts pulsing as one. The "sync" bar is the real order parameter the physicists use; watch it leap off the floor right at the tipping point. Dragging lets you pin a patch into phase and watch the agreement bleed outward into the rest.
Something you might take away
Nobody decides to sync. There's no leader firefly, no broadcast, no plan — just a pile of slightly different clocks, each making a tiny correction toward whoever happens to be nearby. Below a certain coupling that does nothing and everyone stays scattered; above it, the same tiny corrections snowball into a single shared beat, all at once. This exact shape turns up everywhere: pacemaker cells in your heart, neurons firing in step, an audience finding the rhythm of its applause, even a row of metronomes nudging each other through a shared tabletop. When a crowd suddenly moves as one, the question to ask usually isn't who started it. It's whether the coupling just crossed its threshold.