Tap a bird to see what makes it turn.

1.8
0.3
0.2
45

Boids Flocking

What you are looking at

Selected bird
Tap a bird to see the rules that make it turn.
Visual range
The circle shows how far the bird looks. Faint lines connect it to the neighbours inside.
Keep apart
Steer away from the closest birds.
Match heading
Steer to match the direction nearby birds are flying.
Move to centre
Steer toward the middle of the nearby group.

Try this

  1. Tap a bird to see what makes it turn.
  2. Try Scatter, Swarm, then Flock. Watch how tightly the birds group and whether they head the same way.
  3. Turn Rules off and watch the birds keep their individual headings. Turn the rules back on and watch the flock regroup.

Key idea

Each bird responds to the neighbours it can see. Matching headings lets the group turn together, moving toward the centre keeps it together, and keeping apart prevents it from bunching too tightly.

Copy link