Bouncing balls in a heptagon · gpt-3.5-turbo
Output generated Cost / run $0.0025 Runtime 6.5s
Prompt for this run
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.
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
METRICS
Transcript · 4 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.
index.html (1706 bytes)Successfully wrote 1706 bytes to index.html
I have implemented the spinning heptagon with 20 numbered balls dropping from the center. Each ball spins realistically as the heptagon rotates. You can view the interactive animation in the `index.html` file.