Boids flocking · qwen3-coder-next
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 (11374 bytes)Successfully wrote 11374 bytes to /tmp/ws/index.html
Done! The flocking simulation is ready in `/tmp/ws/index.html`. **Features:** - **150 boids** rendered as oriented triangles - **Three flocking behaviors:** - Separation (boids avoid crowding) - Alignment (boids match neighbors' direction) - Cohesion (boids stay grouped) - **Mouse repulsion** - boids flee when you move the cursor near them - **Smooth steering** using vector-based physics - **Toroidal space** - boids wrap around screen edges - **Dynamic coloring** - hue varies by speed and position - **Trail effect** - slight motion blur - **Visual repulsion radius** indicator when mouse is active Open the file in a browser to see the simulation in action.
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 and animate continuously as colored triangles, with mouse-repeller circle visible on click/drag/keys.
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.