One body orbits a fixed central mass under Newtonian gravity, integrated with 4th-order Runge–Kutta so energy stays (nearly) constant over thousands of steps instead of drifting the way a naive Euler step would.
- Acceleration: a = −GM·r̂ / r²
- Circular speed at r: vc = √(GM/r)
- Specific energy: E = v²/2 − GM/r — negative and bound (ellipse), zero (parabola), or positive and escaping (hyperbola)
- Eccentricity: e = √(1 + 2EL²/(GM)²), with specific angular momentum L = r×v
launch v = v_c → e = 0 (circle)
launch v < v_c → 0 < e < 1 (ellipse, closer periapsis)
launch v > v_c → 0 < e < 1 (ellipse, farther apoapsis)
launch v = v_c·√2 → e = 1 (parabolic escape)
launch v > v_c·√2 → e > 1 (hyperbolic escape)