The science
A planet trades kinetic energy for gravitational potential energy as it moves between perihelion (fast, close) and aphelion (slow, far). The total stays constant.
- Energy per unit mass:
KE = ½ v², PE = −GM/r, E = KE + PE = −GM/(2a) for a bound orbit.
- Vis-viva:
v² = GM (2/r − 1/a). Kepler III: T = 2π √(a³/GM) (T in years, a in AU, M in solar masses: T² = a³/M). Kepler II: r × v is constant, so the sectors swept in equal times have equal area.
- Energy boost: scaling the perihelion speed by
k gives E = (GM/rp)(k²(1+e)/2 − 1). The orbit becomes unbound (E ≥ 0) at k = √(2/(1+e)), which is √2 for a circular orbit.
The orbit is integrated with the symplectic velocity-Verlet (leapfrog) scheme with a step that shrinks near the star; energy then oscillates around the true value instead of drifting, and the check button measures this.
Honest simplifications: two-body problem only (one planet, the star fixed at the origin): no other planets, no relativity, no tides, and the star does not recoil. Orbital elements are rounded averages. The 3D page shows the whole system with realistic sizes, which this page does not.