Boids Flocking
How do birds turn together without a leader?
Tap a bird to see what makes it turn.
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
- Tap a bird to see what makes it turn.
- Try Scatter, Swarm, then Flock. Watch how tightly the birds group and whether they head the same way.
- 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.