About this app
This simulation uses Craig Reynolds' classic "boids" model. Each boid follows three simple rules: match the direction of nearby boids, move toward their average position, and steer away if they get too close. No boid knows about the flock as a whole, yet these local rules alone produce natural, swarm-like movement reminiscent of bird flocks and large schools of fish. Click and hold anywhere on the canvas to scatter the boids away from your cursor. Use the 'Add' and 'Remove' buttons to grow or shrink the flock, or 'Reset' to start over.