Boids flocking · kat-coder-air-v2.5
Create a full-screen flocking simulation of boids using separation, alignment, and cohesion, drawn as oriented triangles that steer smoothly and flee from the mouse cursor.
transcript · 4 messages
Create a full-screen flocking simulation of boids using separation, alignment, and cohesion, drawn as oriented triangles that steer smoothly and flee from the mouse cursor.
/tmp/ws/index.html (8032 bytes)Successfully wrote 8032 bytes to /tmp/ws/index.html
Created `/tmp/ws/index.html` — a full-screen boids flocking simulation with: - **Separation, alignment, cohesion** — the three classic flocking rules - **Oriented triangles** — each boid is a teardrop-shaped triangle that points in its movement direction - **Mouse flee** — boids within a radius of your cursor scatter away with strength proportional to proximity - **Smooth steering** — velocity-based movement with speed limits and gradual turning - **Edge avoidance** — soft boundary forces keep boids on screen - **Toroidal wrapping** — boids wrap around edges for continuous space - **Visual polish** — cyan/blue color palette, glow effects, subtle trails, and a faint mouse danger zone indicator Just open the file in a browser and move your mouse to scare the flock!
TAKE IT TO CODE
A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.
RUN
EVALUATION
Boids flock in cohesive clusters with smooth oriented-triangle steering; a red circle marks cursor but boids don't clearly flee it.
Vision grade · anthropic/claude-sonnet-5
MEASUREMENTS
Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.