Boids flocking · seed-2-1-turbo
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.
thinking
The user wants a full-screen boids flocking simulation with four specified behaviors.All content will be packed into one file, and I'll start building the simulation now.
/tmp/ws/index.html (9256 bytes)Successfully wrote 9256 bytes to /tmp/ws/index.html
Created `/tmp/ws/index.html` — a full-screen boids flocking simulation with: - **Three core rules**: separation (avoid crowding), alignment (match heading), cohesion (steer toward group center) - **Oriented triangles** that point in the direction of movement, with glow effects and speed-based brightness - **Mouse flee behavior**: boids scatter from the cursor within a visible red radius, with falloff so closer boids flee harder - **Smooth steering**: velocity is clamped and forces are capped for fluid motion - **Screen wrapping**: boids wrap around edges seamlessly - **Trail effect**: semi-transparent overlay gives motion blur trails - **Touch support** and devicePixelRatio scaling for crisp rendering - Adaptive boid count based on screen size (~200 max) Open `index.html` in a browser to run it — no network needed.
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 flee smoothly from cursor with glowing trails, animating continuously and reacting to all inputs.
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.