Boids flocking · kat-coder-pro-v2
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 · 6 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.
I'll create a full-screen boids flocking simulation with separation, alignment, cohesion, and mouse avoidance. The boids will be rendered as oriented triangles with smooth steering.
/workspace/index.html (15917 bytes)Successfully wrote 15917 bytes to /workspace/index.html
{"command":"ls -la /workspace/index.html"}-rw-r--r-- 1 node node 15917 Jul 31 08:47 /workspace/index.html
Done! I've created a full-screen boids flocking simulation in `/workspace/index.html`. **Features:** - **150 boids** rendered as colorful oriented triangles with gradient fills and glow effects - **Three core flocking behaviors**: separation, alignment, and cohesion - **Mouse avoidance**: boids flee from the cursor within a 150px radius - **Smooth steering**: forces are applied gradually for natural movement - **Interactive controls**: real-time sliders to adjust all parameters: - Separation weight - Alignment weight - Cohesion weight - Mouse avoidance strength - Boid speed - **Live statistics**: displays boid count and FPS in the top-right corner - **Visual feedback**: shows the mouse influence radius and cursor indicator - **Wrap-around edges**: boids that leave one side reappear on the opposite side - **Fade effect**: creates motion trails for a more dynamic visual The simulation runs entirely in the browser with no external dependencies. Open `index.html` in any modern browser to see the boids 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
Colorful triangular boids flock and flee a mouse-avoidance radius, with sliders for tuning parameters.
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.