oneshotlm
Compare all models on this prompt →

Bouncing balls in a heptagon · qwen3-coder-flash

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

# Rotating Heptagon with Dropping Balls I'll create a single-page web app with a spinning heptagon and 20 balls that drop from the center, affected by gravity, friction, and collisions with each other and the rotating walls.

write index.html (13546 bytes)
toolResult

Successfully wrote 13546 bytes to index.html

assistant

I've created a complete single-page web application that displays 20 numbered balls dropping from the center of a spinning heptagon with realistic physics. Here's what the implementation includes: 1. A rotating heptagon that spins 360 degrees every 5 seconds 2. 20 balls that drop from the center with random initial velocities 3. Physics simulation with: - Gravity pulling balls downward - Friction slowing movement over time - Realistic collisions between balls - Collision detection with the rotating heptagon walls - Ball rotation based on their number (spin effect) The visualization features: - Colorful balls with numbers inside them - Smooth animations with proper physics calculations - Gradient background for visual appeal - Responsive design that centers the content - Control buttons to reset the simulation or add more balls All code is contained in a single HTML file with embedded CSS and JavaScript, with no external dependencies. The physics engine handles all collision detection and response manually without relying on external libraries. The balls will continuously drop from the center, bounce off each other, and collide with the rotating heptagon walls with realistic physics behavior. Each ball rotates based on its own spin speed, giving the visual effect of the numbers rotating within the balls. To run the application, simply save the code as an HTML file and open it in any modern browser.

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-flash
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 working

Balls settle at bottom of spinning heptagon; physics/collision appear functional but no keyboard/click interactivity as expected.

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 motion2.8%
on click3.0%
on drag2.7%
on wheel2.8%
on enter + space2.8%
on arrow keys2.9%
on w/a/s/d2.6%
frame spread23.5 / 255
console errors0
js errors none

METRICS

runtime48.1s
tokens in4.5k
tokens out3.4k
cached2.0k
cost / run$0.0043