Code and Gravity

The ball speeds up every bounce

The ball gets 5% faster with every bounce, up to a top speed of 32.

How it works

The ball starts slow inside a circle. Every bounce multiplies its speed by 1.05, so the bounces come faster and faster, and so do the notes. It stops speeding up at the maximum speed and the video loops.

Questions

Is there a speed limit?
Yes. The simulation caps speed at 32 so collisions stay accurate and the ball never skips through a wall.
Is this real physics or an animation?
It is a physics simulation. Collisions are computed 60 times per second from gravity, velocity and bounce rules, then drawn. Nothing is hand-animated.
Will it look the same every time?
Yes. Each video uses a fixed random seed, so the same run plays identically every time, on this site and in the video.
Watch on YouTube →

More like this