Bouncing balls in a heptagon · kat-coder-air-v2.5
Show 20 numbered balls (1 to 20) dropping from the center of a heptagon that spins 360 degrees every 5 seconds. The balls are affected by gravity and friction, collide with each other, and bounce realistically off the rotating walls; show each ball's spin via the rotation of its number. Implement all collision detection yourself.
transcript · 8 messages
Show 20 numbered balls (1 to 20) dropping from the center of a heptagon that spins 360 degrees every 5 seconds. The balls are affected by gravity and friction, collide with each other, and bounce realistically off the rotating walls; show each ball's spin via the rotation of its number. Implement all collision detection yourself.
/tmp/ws/index.html (8153 bytes)Successfully wrote 8153 bytes to /tmp/ws/index.html
/tmp/ws/index.html (6523 bytes)Successfully wrote 6523 bytes to /tmp/ws/index.html
/tmp/ws/index.html (7363 bytes)Successfully wrote 7363 bytes to /tmp/ws/index.html
I've created the complete single-page web app. Here's what it includes: **Features:** - **20 numbered balls** (1-20) with distinct colors, spawning from the center - **Spinning heptagon** that completes one full rotation every 5 seconds - **Gravity** pulling balls downward - **Friction** gradually slowing balls - **Ball-ball collisions** with proper impulse-based physics - **Wall collisions** against the rotating heptagon edges, including: - Proper normal vector calculation for each edge - Wall velocity transfer from rotation to balls - Tangential friction that imparts spin - **Visual spin** - each ball's number rotates to show its angular momentum - **Sub-stepping** (3 steps per frame) for stable physics The file is saved at `/tmp/ws/index.html` and runs entirely offline with no external dependencies.
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
Heptagon spins with numbered balls settling under gravity via physics simulation, but no visible input interactivity.
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.