Homeβ–ΈPhysics & Mechanicsβ–ΈPlanetary Gravity Exploration Dashboard (2D)

Planetary Gravity Exploration Dashboard (2D)

A top-down orbital-mechanics sandbox: a spacecraft orbits a planet under real Newtonian gravity while apoapsis, periapsis, eccentricity and orbital period are recomputed live from the state vectors β€” fire prograde or retrograde burns to raise, lower, or break the orbit.

Physics & Mechanics2DModerate60 FPSπŸ“± Mobile-adapted⇄ 3D version
2d-dynamic-planetary-exploration-simulation β†— Open standalone

The 3D original renders spacecraft, "deep space missions" and an "AI exploration hub" as decorative Three.js groups that spin on a timer β€” there is no gravity, no trajectory and no orbit anywhere in that scene, despite the title promising one. This 2D companion builds the actual mechanic the title describes: a single spacecraft point-mass orbiting a planet under Newton's inverse-square law, integrated with a fixed-step symplectic scheme so the orbit stays closed instead of drifting from numerical energy leakage. A side panel exposes the planet's gravitational parameter, the craft's starting altitude and speed (as a multiple of the local circular velocity) and a time-scale slider, while prograde and retrograde burn buttons let you fire real delta-v along the current velocity direction β€” watch the opposite side of the orbit rise or fall exactly as it would for a real orbital maneuver. Apoapsis, periapsis, eccentricity and orbital period are recomputed every frame straight from the position and velocity vectors using the vis-viva equation and the eccentricity vector, so pushing the orbit past e = 1 flips the readout to an open escape trajectory instead of a closed ellipse.

βš™ Under the hood

2D orbital-mechanics lab: real inverse-square gravity, a fixed-step symplectic integrator, live apoapsis/periapsis/eccentricity/period readouts derived from the vis-viva equation, and prograde/retrograde delta-v burns.

orbital mechanicsgravitykepler orbiteccentricitydelta-vvis-viva

2D Β· HTML5 Canvas 2D Β· 60 FPS target Β· runs fully client-side, no install

❓ Frequently Asked Questions

Q: Why does a prograde burn raise the far side of the orbit instead of the near side?
A: Adding energy at one point in an orbit raises the altitude on the opposite side β€” the point you burn at stays fixed as the new periapsis or apoapsis, while the far side moves. This is exactly how real Hohmann transfer maneuvers work.

Q: What does eccentricity actually measure here?
A: It is the magnitude of the eccentricity vector computed from the current position and velocity β€” 0 is a perfect circle, values approaching 1 are increasingly stretched ellipses, and 1 or above means the craft has enough energy to never return.

Q: Why use a symplectic integrator instead of simple Euler or RK4?
A: Plain Euler integration leaks energy every step, so a "stable" orbit slowly spirals outward or inward even though nothing is supposed to change. The semi-implicit (symplectic) Euler scheme used here conserves the orbit's shape far better over long runs at a fixed time step.

Q: Can I make the spacecraft escape the planet entirely?
A: Yes β€” raise the initial-speed slider above roughly 1.41Γ— the circular velocity (the local escape velocity), or fire enough prograde burns, and the status readout switches to "Escape trajectory" with no periapsis-apoapsis pair.

Q: Why is the 3D version so different from this one?
A: The 3D page is a generic decorative template β€” spinning geometry groups with slider labels that don't drive any physics. This 2D page implements the real orbital-mechanics simulation that the title and description actually describe.

What did you find?

Add reproduction steps (optional)