logo
By Lawrence

5 minutes

A Moon on Rails

Every curve so far came from one planet. Time to add a moon and break things.

The three-body problem

A planet, a moon and a ball make three bodies. For three bodies there is no formula that works every time. Worse, tiny changes at the start grow into big ones later. That's chaos, in the maths sense.

So our moon doesn't get pulled around. It rides a circle on rails. A level built around it plays the same way every time.

Its pull still bends every shot, though. Take a speed-12 shot and compare the gold ellipse with where the ball really goes, over one lap:

with the moon      up to 54.7 units apart, at the worst moment to launch
no moon            within 0.11

Continue reading

Unlock the Full Course

Every lesson, the runnable examples, and the finished build — yours to keep.

$9one-time

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search