oneshotlm
Compare all models on this prompt →

Bouncing balls in a heptagon · qwen3-coder

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.

⛨ sandboxed Open in new tab ↗
transcript · 4 messages
user

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.

assistant

I'll create a self-contained HTML file with a physics simulation of 20 numbered balls dropping into a rotating heptagon with realistic collisions. Here's my implementation:

write index.html (12770 bytes)
toolResult

Successfully wrote 12770 bytes to index.html

assistant

I've created a complete physics simulation with the following features: 1. A rotating heptagon (7-sided polygon) that spins 360 degrees every 5 seconds 2. 20 numbered balls (1-20) that drop from the center 3. Realistic physics including: - Gravity pulling balls downward - Friction slowing balls over time - Elastic collisions between balls and with walls - Angular rotation of balls based on their movement - Ball numbers that rotate with their respective balls The simulation implements custom collision detection for: - Ball-to-wall collisions with a rotating polygon - Ball-to-ball collisions with proper physics responses Key technical aspects: - All physics calculations implemented from scratch - Efficient collision detection algorithms - Smooth animation using requestAnimationFrame - Self-contained in a single HTML file with no external dependencies - Responsive design that works in any modern browser To view the simulation, simply open the index.html file in any web browser. The balls will drop from the center, bounce off the rotating heptagon walls, collide with each other, and gradually settle at the bottom while spinning realistically.

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

modelqwen3-coder
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 working

Numbered balls drop and pile at the bottom of a rotating heptagon with physics; no interactivity affects it, as expected since none was needed.

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.

idle motion3.2%
on click3.2%
on drag3.3%
on wheel2.6%
on enter + space3.2%
on arrow keys2.4%
on w/a/s/d2.6%
frame spread12.4 / 255
console errors0
js errors none

METRICS

runtime64.5s
tokens in151
tokens out3.0k
cached6.1k
cost / run$0.0037