Craig Reynolds asked in 1986 what rules a bird would need to flock, and found three are enough. Separation: steer away from crowding neighbors. Alignment: steer toward the average heading of neighbors. Cohesion: steer toward their average position. Each agent, each “boid,” sees only its local neighborhood, yet the group wheels, splits around obstacles, and reforms with the unmistakable look of starlings over a pier. Nobody leads; the flock is the emergent sum.
It became one of the founding demonstrations of emergent behavior, cited far outside graphics, and it shipped almost immediately into film (the bats and penguin armies of early-90s features were boids). Every creative-coding tutorial sequence eventually arrives at it because the payoff is so far beyond the code: thirty lines, and the screen is alive.
For music visuals, flocks are expressive raw material. The rule weights are performable parameters: tighten cohesion and the swarm balls up anxiously, boost separation and it explodes apart, add a wind from a flow field and the whole organism leans. Accent-gated disturbances, a predator spawned on the drop, give kicks something structural to do, which is precisely the kind of kick response worth building.