Wonderlab

Murmuration

Ten thousand starlings, one mind. And you are the falcon.

Move to steer the falcon · Click to stoop · SpaceDrag to steer the falcon · Tap to stoop

How a murmuration thinks

A murmuration has no leader. In 2008 the STARFLAG team (Ballerini and colleagues) reconstructed starling flocks over Rome in 3D from stereo photographs and found that each bird responds to a fixed number of neighbours, six or seven, however near or far they are. This topological rule keeps the flock together as its density swells and thins. Here every starling looks up its 7 nearest neighbours through a spatial hash every few frames and steers by separation, alignment and cohesion, with a little noise of its own.

Local rules still add up to a single mind. Cavagna and colleagues (2010) found that changes in speed and heading are correlated across the whole flock however big it grows: the correlations are scale-free. A turn that starts at one edge sweeps across the flock as a wave, measured in later work at roughly 20 to 40 metres per second.

The falcon is the reason it matters. Birds closest to a peregrine dodge, and their neighbours copy the move a beat later, so "agitation waves" ripple outward; Procaccini and colleagues (2011) recorded them over Rome. The dark bands are birds banking: tilted wings show more of themselves to us. When the falcon strikes, the flock bursts apart around it in a flash expansion, then flows back together.

Why at dusk? Starlings gather above their winter roost in the last light before dropping into the reeds for the night. A 2017 citizen-science survey of thousands of UK murmurations (Goodenough and colleagues) concluded that safety in numbers against predators is the most likely reason they form.

Under the hood: the flock lives on the CPU in typed arrays. Positions are hashed into a uniform grid for the nearest-neighbour search, the falcon's threat spreads as an excitable wave over the neighbour graph, and WebGL2 draws every bird as instanced geometry, a body and two flapping wings banked into its turn. Birds land in a 4x multisampled coverage layer over an HDR sky with bloom and a filmic tone curve. The water reflects the flock through its own ripples.

Controls

Move the pointer (or drag) to steer the falcon. Click or tap to stoop, a diving strike at the bird under the pointer. Space stoops into the heart of the flock. A toggles the falcon's own hunting, M toggles sound, [ and ] move the light toward golden hour or nightfall, and H hides the interface.