A Study of the Cosmos

Celestial
Mechanics

The mathematical language of planetary motion, gravitational dynamics, and the architecture of the solar system.

G = 6.674 × 10⁻¹¹ N·m²/kg² Gravitational Constant
1 AU = 1.496 × 10¹¹ m Astronomical Unit
c = 2.998 × 10⁸ m/s Speed of Light

Johannes Kepler · 1609–1619

The Three Laws of Planetary Motion

Derived empirically from Tycho Brahe's meticulous observations, Kepler's laws govern the shape, speed, and period of every orbiting body.

First Law
The Law of Ellipses
Every planet orbits the Sun in an elliptical path, with the Sun at one focus. A circle is the special case where e = 0.
r(θ) = a(1−e²) / (1 + e·cosθ)
Second Law
Equal Areas
A line joining a planet to the Sun sweeps equal areas in equal times — conservation of angular momentum.
dA/dt = L / (2m) = const
Third Law
Harmonic Law
The square of the period is proportional to the cube of the semi-major axis — geometry governs time.
T² / a³ = 4π² / (GM)
r(θ) = a(1 − e²) 1 + e cos θ   where   e = c a = 1 − b²/a²

Polar equation of a Keplerian orbit — r is distance from focus, θ is true anomaly

Interactive Orbit Simulator

Vary eccentricity and watch the planet accelerate at perihelion — Kepler's 2nd Law in action.

Orbital Parameters
Keplerian Orbit

Isaac Newton · Principia Mathematica 1687

Universal Gravitation & The Two-Body Problem

Newton unified terrestrial and celestial mechanics — the same force pulling an apple down holds the Moon in orbit.

F12 =G m1 m2 |r12 r12     ( G = 6.674 × 10⁻¹¹ N·m²·kg⁻² )

Newton's Law of Universal Gravitation — attractive force between masses m₁ and m₂

= G M r³ r      ⟹   ε = − GM 2a (specific orbital energy)

Equation of motion in the two-body problem — reduces to 1-body problem in relative coordinates

Gravitational Acceleration

Vary mass M and radius R to explore surface gravity across planets.

Surface Gravity Calculator
g = G M R² = 9.807 m/s² (Earth)
Gravitational Field Lines

Planetary Data at a Glance

BodySurface g (m/s²)Escape VelocityOrbital Period (days)Semi-major Axis (AU)

Classical Orbital Mechanics

The Six Orbital Elements

Any Keplerian orbit in 3D is fully specified by six classical orbital elements — three for shape/size, three for orientation.

a
Semi-Major Axis
Half the longest diameter of the ellipse; determines period via T² ∝ a³.
e
Eccentricity
Shape: e=0 circle, 0<e<1 ellipse, e=1 parabola, e>1 hyperbola.
i
Inclination
Tilt of orbital plane relative to reference plane (ecliptic), in degrees.
Ω
Long. of Ascending Node
Angle from reference direction to where orbit crosses the ecliptic going north.
ω
Argument of Periapsis
Angle from ascending node to periapsis, measured in the orbital plane.
ν
True Anomaly
Current angular position from periapsis — the only time-varying element.

The Vis-Viva Equation

Relates orbital speed to distance from focus — the single most useful formula in astrodynamics.

v² = G M ( 2 r 1 a )

Vis-Viva equation — v at distance r, semi-major axis a, central body mass M

ε = − G M 2a  =  v² 2 G M r    (ε < 0 → bound, ε = 0 → parabolic, ε > 0 → hyperbolic)

Specific orbital energy — conserved throughout the orbit

Vis-Viva Speed Calculator
Speed vs. Orbital Position

Numerical Integration

N-Body Gravitational Simulation

Beyond two bodies there is no closed-form solution. We integrate Newton's equations numerically using the Runge-Kutta 4 method.

i = G j ≠ i mj (rjri) |rjri

Acceleration on body i due to all other bodies j — summed pairwise, O(N²) per step

Runge-Kutta 4 Integration — Per Step
k₁ = f(t, y) · Δt
k₂ = f(t + Δt/2,  y + k₁/2) · Δt
k₃ = f(t + Δt/2,  y + k₂/2) · Δt
k₄ = f(t + Δt,  y + k₃) · Δt

y(t + Δt) = y(t) + (k₁ + 2k₂ + 2k₃ + k₄) / 6

Energy Conservation

Escape Velocity & Orbital Velocities

The minimum speed to escape a gravitational field entirely — derived by setting total mechanical energy to zero.

vesc = 2G M R    (set Etotal = 0)

Escape velocity — minimum speed to escape to r → ∞

vcirc = G M r  =  vesc √2

Circular orbital velocity at radius r

Velocity Calculator
Trajectory Simulation

Three-Body Restricted Problem

Lagrange Points & Orbital Resonance

Five equilibrium positions in the co-rotating frame where a third small mass feels no net force.

Φeff = G M1 r1 G M2 r2 1 2 ω²(x² + y²)

Effective potential in rotating frame — Lagrange points are where ∇Φeff = 0

L4 & L5 stable iff    M1 M2 ≥ 24.9599    (Routh Criterion)

Stability condition — satisfied by Earth-Moon (81.3) and Sun-Jupiter (1047.6)

L1
Between the bodies
Unstable. SOHO, DSCOVR. Direct solar observation with unobstructed line of sight.
L2
Beyond the smaller body
Unstable. James Webb Space Telescope, Herschel, Planck. Cold, dark, thermally stable.
L3
Opposite the smaller body
Unstable. Hypothetical "anti-Earth." Practically unused due to instability and solar occultation.
L4
60° ahead — Trojan camp
Stable. Jupiter's Greek asteroids. Stability requires Routh criterion M₁/M₂ ≥ 24.96.
L5
60° behind — Greek camp
Stable. Forms equilateral triangle with primaries. Over 10,000 Trojan asteroids known.
Lagrange Points — Co-rotating Frame