Starling Murmuration (2D)

Hundreds of birds with local rules: watch polarisation, density and the falcon attack.

Switch to 3D

Presets

Playback

Flock

Number of birds and speed.

Local rules

Weights of the three steering rules and the neighbour count.

Disturbance

Heading noise, roost pull and the falcon.

Experiments

Layers

Model checks

The science

Local rules, global flock

Each bird follows three steering rules computed only from its nearest neighbours (Reynolds' boids): separation away from birds that are too close, alignment toward the mean heading of its neighbours and cohesion toward their centre of mass. No bird knows the shape of the flock; the murmuration emerges from these local interactions.

Topological versus metric neighbours

Field measurements of starling flocks (Ballerini et al., 2008) found that each bird interacts with a fixed number of neighbours, about six to seven, rather than with everything inside a fixed radius. Use the "neighbour rule" control to compare the two. Topological interaction keeps a flock cohesive when its density changes, because the number of partners stays constant.

Order parameter

The polarisation Φ = |Σ v_i| / (N v) is 1 for a perfectly aligned flock and about 1/√N for random headings. Noise in the heading change competes with alignment, giving the Vicsek order-disorder transition that the sweep graph shows.

Predator

A falcon chases the nearest bird. Birds within the panic radius flee and align more strongly, which produces the waves and splits seen in real attacks.

Simplifications

Two dimensions only (real flocks are 3D and also depend on roll and aerodynamics), constant speed, periodic world, no vision cone or reaction delay, and the weights are tuned for appearance rather than fitted to data.

What to try
  • Switch the neighbour rule between topological (7 birds) and metric (radius) and watch how density changes the cohesion.
  • Raise noise until the flock loses its polarisation, then run the noise sweep graph.
  • Release the falcon and watch the flock split and rejoin.
  • Click a bird to see its neighbour links.
Polarisation versus time
Density: nearest-neighbour distance (m)
Speed distribution (m/s)
Noise sweep: polarisation versus noise