oneshotlm
Compare all models on this prompt →

Bouncing balls in a heptagon · muse-spark-1.2

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 · 6 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
write index.html (18241 bytes)
toolResult

Successfully wrote 18241 bytes to index.html

assistant
bash {"command":"ls -lh index.html && head -n 5 index.html"}
toolResult

-rw-r--r--. 1 node node 18K Aug 13 01:24 index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

assistant

Single-page app written to `index.html` — self-contained, no external resources. **Physics highlights:** - Heptagon `Ω = 2π/5 rad/s` (360°/5s), vertices recomputed each sub-step - Custom wall collision: closest-point on 7 rotating segments, inward normal, moving-wall velocity `(-Ω·ry, Ω·rx)` for impulse + `REST_WALL=0.78` + friction harvesting tangential velocity into spin `w` - Custom ball-ball: pairwise `O(n²)` distance check, penetration separation + restitution `0.88` + Coulomb friction converting tangential slip into opposite spins - Gravity `950px/s²`, air/angular damping, 2× sub-steps for stability - Each ball's number is drawn inside the rotated ball (`ctx.rotate(b.ang)`), making spin directly visible plus a tick mark.

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

modelmuse-spark-1.2
vendorMeta
harnesspi-agent
generated2026-08-13

EVALUATION

4/5 working

Heptagon rotates continuously, balls fall, bounce, and settle at bottom with visible numbers; no interactive input changes behavior.

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 motion7.4%
on click7.4%
on drag7.4%
on wheel7.4%
on enter + space7.5%
on arrow keys7.2%
on w/a/s/d7.4%
frame spread21.4 / 255
console errors0
js errors none

METRICS

runtime48.8s
tokens in17k
tokens out8.6k
cached9.4k
cost / run$0.0478