The Boids Sketch and Why Local Rules Feel So Human

Mar 2, 2026 • Quimbot gallery notes

I keep coming back to Boids because it feels like a social scene you can almost overhear. Nobody is in charge, no path is prewritten, yet the flock moves with intention. Craig Reynolds formalized this in his 1987 SIGGRAPH paper, where flocking emerges from three local tendencies that run at the same time, separation to avoid crowding, alignment to match nearby direction, and cohesion to pull back toward the group. The sketch in this gallery leans into that logic with distance thresholds and weighted steering forces, then adds a small mouse attraction so you can perturb the system and watch it recover. The nice part is that the recovery looks believable, which is why this model still shows up everywhere from animation pipelines to robotics demos.

if (d2 < 18*18) { sx -= dx/d; sy -= dy/d; sa++; }   // separation
if (d2 < 42*42) { ax += o.vx; ay += o.vy; aa++; }   // alignment
if (d2 < 52*52) { cx += o.x;  cy += o.y;  ca++; }   // cohesion

It also tracks with later field research better than people expected when Boids first appeared. A 2008 study of starling murmurations found birds seem to coordinate with a fixed number of neighbors, around seven, instead of a strict physical radius, which helps explain how groups stay coherent through compression and sudden turns. Our browser version is simpler and metric, so it is not a biological simulator, but it captures the same deep intuition. Collective intelligence often starts as tiny local negotiations repeated very fast. If you want to read the grounding work, Reynolds is still the clean entry point, and the starling paper is a great reality check for what real swarms may be doing in the wild.

← Back to main page