Orbits
Two bodies pulling on each other trace exactly one history. What that historylooks like is a separate question, and it is answered by where you put the origin. Stand still in space and you see two drifting spirals. Stand on the barycentre and you see two nested ellipses. Stand on the first body and you see the single clean ellipse the textbooks draw. An orbit only looks like an ellipse from the right frame, and most of what is confusing about orbits is a frame problem rather than a physics problem.
1 · The playground
Mutual gravity between two or three bodies, integrated with velocity Verlet. Drag a body to move it; drag the tip of its arrow to set its velocity. While paused, the dashed lines are the future — the same integrator run forward and drawn, updating as you drag.
2 · The same orbit, three frames
One two-body system, solved exactly, drawn three ways. The switcher picks a frame; theblend slider morphs continuously between them, which is the whole point — the frames are not three pictures, they are one picture seen from three origins. Watch the barycentre: it is the only thing here moving in a straight line.
3 · The ellipse, and equal areas
The relative orbit on its own. Both foci are marked; the body sits on the ellipse and moves at the speed Kepler's equation gives it, fast at periapsis and slow at apoapsis. The wedges are swept over equal intervals of time.
4 · The plane, and how it drifts
An inclined orbit around a central body, in a hand-rolled perspective projection — drag to swing the camera. The faint disc is the reference plane. Where the orbit crosses it is the line of nodes: ascending in green going up, descending in red going down. Then two slow rotations are added on top, and they are not the same rotation.
What it actually does
- Nothing in the physics changes as the frame slider moves. Only the origin does, and two drifting spirals unwind into nested ellipses and then into one relative ellipse.
- The barycentre is the one point in the system that travels in a straight line.
- With no net momentum the fixed and barycentric frames coincide, which is why a system at rest looks so much simpler than it is.
- Kepler’s equal areas are visible rather than assertable once the swept wedges are filled: broad and stubby at periapsis, a long thin splinter at apoapsis, identical area.
- Nodal and apsidal precession are separable and worth separating. Zero the apsidal rate and the ellipse is carried round rigidly; zero the nodal rate and the long axis walks around inside a plane that holds still.
What the rebuild taught
- The morph is the argument. Cutting between three frames shows three pictures; blending continuously between them shows that there was only ever one. It is the same point-by-point blend as the four scenes in Orbital Field, applied to the origin instead of to the layout.
- A fixed-step integrator needs a softened potential. Evaluating the inverse square at the softened radius stops a near miss dividing by nearly zero and flinging a body off the page in a single step, and the softening belongs in the UI rather than buried, because turning it down is how you see why it is there.
- Symplectic stepping is what makes a demo you can leave running. Energy wanders a little and does not run away, which matters more here than per-step accuracy.
- Dropping markers over time is how a slow drift becomes legible. Precession is invisible in the instant and obvious as a trail of periapsis marks.
- A frame change is a per-sample origin; a camera pan is a per-frame origin. The first version subtracted one origin evaluated at the current time from every point in the history, which is a rigid translation: the curve slid about and its shape never changed, so the blend slider moved and the picture did not. The origin has to be indexed by the sample’s own time before spirals will unwind into ellipses.
- A softened potential is a physics change, not a neutral safety net, and a choreography is exactly the case that notices. The figure-eight survives forty seconds of fixed-step Verlet at its own softening and visibly unwinds in thirty at the default, so the softening is per-preset and the knob goes low enough to watch it fail.
- Two captions stated the physics backwards and both were caught by looking at the render rather than by argument: periapsis wedges are broad and stubby, not long and thin, and nodal precession does not leave dropped markers where they are, it carries the whole ellipse round and holds periapsis at a fixed angle from the ascending node. Plausible prose is not evidence; the numeric readout is.
- Going analytic was the structural decision. Solving Kepler directly rather than integrating means sliders morph the scene instead of resetting it, the trail is evaluated backwards from now rather than remembered so it never depends on frame rate, and nothing drifts over a long session. Only the figure that is genuinely n-body integrates.
Rebuild
Four figures: an n-body playground with dragged velocity arrows and a predicted path, the frame morph, the ellipse with equal-area wedges, and the inclined plane with its line of nodes and the two precessions on separate knobs.