← Tools

Flock

Experiment with a mathematical model of birds in flight. Three knobs, no leader — and yet a murmuration.

Try this

  • Line up the knobs with the marks to see a realistic model of a flock of birds in motion.
  • Turn each knob one at a time to change individual settings. Notice how it affects the overall flocking motion.
  • Take grouping to zero and the flock loses its cohesion, breaking into loose fragments that drift apart. Take separation to zero and it collapses into a few tight knots. Take alignment to zero and the birds mill about like insects instead of sweeping like starlings.

Grouping

Birds fly toward their neighbours.

Off1.00Strong

Separation

Birds keep a minimum distance from each other.

Off1.00Strong

Alignment

Birds match their direction and speed to their neighbours.

Off1.00Strong

What’s going on?

The flight of this digital flock is beautifully intricate. But its complex behaviour arises from just the three simple rules you control with the knobs.

Each bird can only see its neighbours within a short distance. On every frame it averages what those neighbours are doing, nudges its own heading a little toward that average, and backs off from anyone who has come too close. That is the whole model.

There is no central coordination of the birds — no leader, and no bird that can see the flock it belongs to. Yet the flock moves as if with one unified mind, an example of what’s called emergent behaviour. Real birds, such as starlings, do something similar; their flocking is called a murmuration.