5 minutes
Draw the Equation
So far we watch the balls and see where they went. With one planet, we can do better: work out the whole path the moment the ball leaves the muzzle.
The orbit's numbers
A ball's orbit around one planet is always the same kind of curve. Only its size and stretch change. Two numbers pin it down:
- p, the orbit's width at the planet. Go a quarter turn round from the closest point, and the ball is p away.
- e, how stretched it is. 0 is a circle. Between 0 and 1 is an ellipse. 1 is a parabola, and above 1 is a hyperbola.

Both come straight from where the ball starts, r, and how it's moving, v. You don't need to work these by hand. The × and the little hat on r̂ are 3D arrow maths, and the game does them for you:
The picture above is the speed-12 shot. The formula puts the far point at 28.2857. The game's own step flies the ball out to 28.2876. They agree to three decimal places.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.