Cosmic Solar System Simulation

Eight planets orbiting the Sun under real gravity, with Kepler's third law measured live.

Presets

Controls

Readouts

Independent check

running...
The science

Gravity. Each body attracts every other: ai = Σj G mj (rj - ri) / |rj - ri|³. In astronomical units, years and solar masses G = 4π². All eight planets and the Sun are integrated together with the symplectic velocity-Verlet scheme (fixed step 0.0005 yr), which keeps the energy error bounded instead of drifting.

Kepler's laws. Orbits are ellipses with the Sun at a focus; equal areas are swept in equal times (angular momentum conservation, shown as a drift readout); and T² = a³ with T in years and a in AU. The page measures each planet's period by following its angle around the Sun and compares it with a3/2. Small gaps come from the planets pulling on each other.

Start conditions. Each planet starts at perihelion with the vis-viva speed v = √(G(M+m)(1+e)/(a(1-e))); the whole system is shifted to the centre-of-mass frame. The Jupiter-mass multiplier shows how a heavy neighbour perturbs the others (x1000 is roughly a second star, and the inner planets are thrown around).

Honest limits: two dimensions only (all orbits in one plane, real tilts of up to 7° ignored); typical orbital elements (a, e, masses) from memory-level rounded tables, not an ephemeris, so planet positions do not match the real sky on any date; pair forces are softened by 0.001 AU so close encounters stay finite; no moons, asteroids, relativity (Mercury's perihelion advance of 43 arcsec/century is absent) or tides; planet sizes are exaggerated for visibility.