oneshotlm
Compare all models on this prompt →

Bouncing balls in a heptagon · llama-3.3-70b-instruct

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

Successfully wrote 1924 bytes to index.html

assistant

This code creates a canvas element and gets a reference to it. It then creates an array of 20 balls, each with a random initial velocity and rotation. The `draw` function is called repeatedly using `requestAnimationFrame`. In each call, it clears the canvas, draws a heptagon that spins 360 degrees every 5 seconds, and draws each ball at its current position. It also updates the position and velocity of each ball based on gravity and friction, and checks for collisions with the walls and other balls. If a collision is detected, the ball's velocity is reversed and its rotation is updated. The ball's spin is also updated based on its rotation.

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

modelllama-3.3-70b-instruct
vendorMeta · Llama
harnesspi-agent
generated2026-08-01

EVALUATION

1/5 broken

Only an empty rotating heptagon with a center dot is shown; no numbered balls, gravity, or collisions appear.

off-prompt

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 motion0.6%
on click0.6%
on drag0.6%
on wheel0.6%
on enter + space0.6%
on arrow keys0.6%
on w/a/s/d0.5%
frame spread4.6 / 255
console errors0
js errors none

METRICS

runtime17.4s
tokens in4.1k
tokens out844
cached0
cost / run$0.0009