Boids: Flocking Behavior
CS 482
Lecture, Dr. Lawlor
Back in 1986, Craig Reynolds wrote a good
SIGGRAPH paper on simulating flocks of birds, which he called
"Boids".
This replaces the complexity of actual bird brains with three simple
vectors:
- Separation: if you're too close to a neighbor, steer away from
them.
- Alignment: adjust your velocity towards the average velocity
of your neighbors. This keeps the flock moving in the same
direction.
- Cohesion: move toward the average position of your
neighbors. This keeps the sides of the flock from becoming
ragged.
Note that in each case, we only perform local interactions with
nearby neighbors, but the global effect is for the boids to respond
coherently as a single mass.
See my Boids / flocking
example.
In real life, flocks
of starlings create strikingly similar patterns. Schools of
sardines are similar, except they also scatter en masse to
avoid predators such as sharks or diving birds.