Starling Flock — 2D Predator Evasion (Boids)
Top-down 2D boids lab: separation, alignment and cohesion steer a flock of starlings while a diving predator triggers panic-flee behaviour within its threat radius — click the sky to add an attractor.
This 2D companion runs the same Reynolds boids rules as the 3D version — separation, alignment and cohesion — from a plain top-down canvas view: a diving predator chases the flock centroid, birds inside its threat radius peel away in a fear response, and a click on open sky drops a short-lived attractor the flock steers toward.
Top-down Canvas2D boids: separation/alignment/cohesion steering forces, a predator that dives at the flock centroid, panic-flee inside a threat radius, and a click-to-attract point.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install