Boids

2024-05-22

These fish used to swim across the front page of this website. Click anywhere to drop some food and they will come for it.

Boids are the invention of Craig Reynolds, who in 1986 wanted to animate flocks of birds without having to script the path of every bird by hand. His solution was to give each bird, or bird-oid object, three rules to follow. Steer away from neighbours that are too close. Steer in the same direction as the neighbours. Steer towards the middle of the neighbours.

No fish above knows about the school it swims in. It can only see a short distance, and not at all behind itself, and it reacts to whoever happens to be in view. There is no leader and no plan, yet the group turns as one, splits around nothing in particular and finds itself again.