Up to 250 colourful birds flock together following Craig Reynolds' three rules of Boids: separation (avoid crowding), alignment (match neighbours' direction) and cohesion (move toward the flock's centre). Hit scatter to spook them!
Emergent group behaviour from three local rules. No bird knows the global pattern — each reacts only to its nearest neighbours.
Adjust separation, alignment and cohesion strengths. Hit Scatter to frighten the flock. Release the hawk to see predator-avoidance behaviour.
Reynolds published his Boids algorithm in 1987. It was so convincing that it was used in the bat swarm in Tim Burton's Batman Returns (1992).