Free tools & games for everyone
Free · No sign-up · No accounts
Watch a flock appear from three simple rules: separation, alignment and cohesion. Tune boids live and see order collapse with noise in the Vicsek model.
| Tab | Move between tabs, sliders and buttons |
|---|---|
| Arrow keys on a slider | Change the value by one step (the flock reacts at once) |
| Enter in a box | Run the Vicsek model |
Craig Reynolds showed in 1987 that three local steering rules are enough to make computer "boids" flock like birds; the idea is used in films and games and helps biologists think about starlings and fish. Here every bird adds three pulls to its velocity: towards the centre of the neighbours it can see (cohesion), towards their average velocity (alignment) and away from any closer than 14 pixels, more strongly the closer they are (separation). Speeds are kept between 40 % and 100 % of the top speed, and the field wraps round at the edges. All birds look first and then all move, so the order in which they are listed does not matter.
The Vicsek model (Tamás Vicsek and colleagues, 1995) is a physicist's version: particles move at a fixed speed and each step take the average heading of all particles within distance 1, plus a random turn of up to plus or minus half the noise. It shows a change from disorder to order, a phase transition, as the noise is lowered or the particles are packed closer. Both are teaching models with a seeded random number generator; real birds use more cues. Everything runs in your browser.
A fresh daily puzzle every morning, and new tools added every month.
Browse every product