Code and Gravity

Exponential growth: why the ball suddenly fills the screen

When something grows by a fixed percentage each step, the increase gets bigger every time. A ball that grows 7% per bounce roughly doubles every 10 bounces, so most of the growth is crammed into the last few bounces.

The numbers

The ball starts with a radius of 8 and multiplies it by 1.07 on every bounce. After 10 bounces it is about 1.97 times bigger, after 20 about 3.87 times, and after 30 about 7.6 times.

Doubling time

The time to double is the same at every stage: the natural log of 2 divided by the natural log of 1.07, about 10.2 bounces. A radius of 8 becomes 16, then 32, then 64, each in about 10 bounces.

Why the end feels sudden

The ball stops at a radius of 320, which is 40 times its starting size. That takes about 55 bounces. In the last 10 bounces the radius jumps from about 168 to 320, nearly as much growth as the previous 45 bounces combined (8 to 168).

The speeding-up ball

Our "faster every bounce" video uses the same idea with speed multiplied by 1.05 per bounce. Speed grows exponentially, so the bounces and the notes come faster and faster until it reaches the speed cap.

Questions

What is exponential growth?
Growth where each step multiplies the amount by the same factor, so bigger amounts grow by bigger steps.
Why does a small percentage matter so much?
Because it compounds. 7% sounds small, but applied 55 times it multiplies the size by about 40.

Try it: open in the sandbox →

Sources: Exponential growth (Wikipedia)

By Code and Gravity · 2026-10-23

More to learn