one force, everything downstream of it
what Kepler saw without a canvas element
Ellipses come free
Nothing in the code draws an ellipse. The inverse-square law plus a sideways shove produces them on its own — the shape is a consequence, not an instruction.
Fast near, slow far
Kepler's second law, visible as trail color: the moon sprints past the star and dawdles at the far end.
The preview is not a guess
While you aim, a phantom copy of your moon is integrated 320 steps ahead every frame. The dots are physics, not a bezier drawn to look plausible.
Why the orbit survives
Update velocity first, then position with the new velocity. That one-line reordering conserves a shadow of the true energy — RK4's fancier cousin for long-running orbits.
Drag back, let fly
Pull away from where you want to go. Every playground intuition applies.
Two ways to leave
Launch too hard and the conic flips from ellipse to hyperbola — the moon leaves and never returns. Launch too soft and the star collects you with a small flare. The interesting lives are in between.
press, drag back, release to launch · dotted line = simulated future · star mass bends every orbit live