Skip to content

← labtoy2026-09-10

Boids

A flock from three rules. Turn separation, alignment and cohesion up and down, chase it with the pointer, and watch order appear from nothing.

order 0%

Move the pointer over the flock and it scatters; they treat it as a hawk. Order is how much of the flock points the same way: 100 is one heading, 0 is chaos. Colour is heading, so a flock that agrees turns one colour.

Try

  • Alignment to 0: a crowd, not a flock.
  • Separation to 0: they collapse into a ball.
  • Cohesion up, sight down: many tight little flocks.
  • Trails on, then chase them.

Craig Reynolds, 1986. No boid knows about the flock; each one only looks at the few around it. The shapes you see, the splitting, the rejoining, the ripple when the hawk comes, are not programmed anywhere. That is the whole point of it.