Kepler Laws Orbital Simulator Back
Astronomy

Kepler's Laws Simulator — 1st, 2nd, 3rd Laws Visualized

Visualize all three Kepler laws on a single orbit animation. Vary eccentricity and semi-major axis to see the ellipse shape, constant areal velocity, and T² ∝ a³ relationship in one view. For Newton-Raphson numerical solving see the Kepler equation simulator; for satellite design see orbital mechanics.

Orbital Parameters

Results
Orbital period (years)
Perihelion speed (km/s)
Aphelion speed (km/s)
Areal velocity (AU²/yr)
Orbit animation

Yellow: Sun (one focus). Blue: planet. The orange swept area illustrates Kepler's 2nd law (constant areal velocity).

Kepler's three laws — getting an intuition

🙋
Kepler's laws are in every textbook, but "elliptical orbit" and "equal areas in equal times" feel abstract. Can you make them concrete?
🎓
Watch the simulator. As the planet sweeps around the orbit, the orange swept-area sector changes shape but its area per unit time stays constant. That's Kepler's 2nd law in action.
🙋
Yes — near the Sun the sector is long and thin, and far from the Sun it's short and wide. The planet's speed is clearly different at the two ends.
🎓
That is the 2nd law. Angular-momentum conservation gives $L = m r^2 \dot{\theta} = \text{const}$, so when $r$ is small the angular speed $\dot{\theta}$ must be large. Even Earth is about 1 % faster at perihelion (January) than at aphelion (July).
🙋
If I pick the Halley's comet preset, eccentricity jumps to 0.967 and the orbit becomes very elongated. The perihelion speed must be huge.
🎓
Halley's perihelion speed is about 54 km/s, but its aphelion speed (out beyond Neptune) is only ~0.9 km/s — a 60× ratio. With $a = 17.8$ AU, the 3rd law gives $T = 17.8^{1.5} \approx 75$ years, matching the observed 75–76-year period. Its next perihelion passage is 2061.
🙋
What does the 3rd law actually look like in practice?
🎓
$T^2 \propto a^3$. If you log-log-plot solar-system planets you get a straight line of slope 3/2. Newton ran the relation backwards to derive his $F \propto 1/r^2$ law of gravitation — historically this was a turning point in physics.

The three laws and their math

1st law (ellipse law): every planetary orbit is an ellipse with the Sun at one focus. In polar form:

$$r = \frac{a(1-e^2)}{1 + e\cos\theta}$$

$r$: distance from the Sun, $a$: semi-major axis, $e$: eccentricity, $\theta$: true anomaly. Perihelion: $r_p = a(1-e)$. Aphelion: $r_a = a(1+e)$.

2nd law (equal areas): the line from the Sun to the planet sweeps equal areas in equal times. From angular-momentum conservation:

$$\frac{dA}{dt} = \frac{1}{2}r^2\dot{\theta} = \frac{L}{2m} = \text{const}$$

where $L = mr^2\dot{\theta}$. The areal velocity is $h = L/m = \sqrt{GMa(1-e^2)}$ ($G$: Newton constant, $M$: solar mass).

3rd law (harmonic law): the square of the period is proportional to the cube of the semi-major axis:

$$T^2 = \frac{4\pi^2}{GM}\, a^3$$

In solar-system units ($T$ in years, $a$ in AU), this collapses to $T^2 = a^3$.

Practical applications

Satellite orbit design: GPS satellites at ≈20,200 km altitude (≈3.36 R_E) have a ≈12 h period; the ISS at ≈420 km has a ≈92 min period (≈16 orbits per day). The 3rd law gives both numbers immediately.

Hohmann transfers: a minimum-energy trajectory between two coplanar circular orbits. Earth-to-Mars takes ~259 days; this is a direct application of Kepler's 3rd law.

Common misconceptions

"The Sun sits at the centre of the ellipse" is wrong. The Sun is at one of the two foci. The centre-to-focus distance is $a e$. For Earth ($e \approx 0.017$) the Sun is nearly central, but for Mars ($e \approx 0.093$) the offset is clearly visible.

This simulator solves the two-body problem only. Real orbits suffer perturbations from other planets, and Mercury's perihelion precession requires general relativity for a complete description.

Theory & key formulas

1st law (ellipse): $r = \dfrac{a(1-e^2)}{1+e\cos\theta}$

2nd law (equal areas): $\dfrac{dA}{dt} = \dfrac{L}{2m} = \text{const}$

3rd law: $T^2 \propto a^3$ (in AU and years, $T^2 = a^3$).

FAQ

Each planet moves on an ellipse with the Sun at one of the two foci. A circle is a special ellipse of eccentricity zero.
Because angular momentum is conserved for any central force. With $L = mr^2 \dot{\theta}$ constant, $r^2\dot{\theta}$ is constant — and that quantity is twice the rate at which area is swept out.
Measuring a satellite's period gives its semi-major axis directly. The same relation lets astronomers measure the masses of binary stars and exoplanet hosts.
Newton showed that a $1/r^2$ central force produces conic-section orbits. Bound trajectories are ellipses; unbound ones are parabolas (escape) or hyperbolas (super-escape).

Real-world use cases

Industry: communications and weather satellites are placed in geostationary orbit by transferring from a low Earth orbit through an intermediate ellipse and circularising at apogee — Kepler's laws size every leg of that manoeuvre.

Education and research: introductory aerospace and astronomy courses use this kind of simulator to make speed variation along the ellipse tangible. Students compare the simulator's $T$ and apsidal speeds against the analytic results.

CAE workflow: dedicated tools such as STK or GMAT propagate orbits with high precision; this simulator is a sketch-level tool for understanding the geometry before committing to a full numerical propagation.

How to Use

  1. Enter semi-major axis (AU) in vANum field to define orbital size; typical values range 0.39 AU (Mercury) to 39.5 AU (Neptune)
  2. Input eccentricity (0–0.999) in vENum to set orbit shape; e=0 produces circular orbit, e=0.206 approximates Earth's ellipse
  3. Click simulate to compute orbital period using Kepler's third law (T² ∝ a³), then calculate perihelion/aphelion velocities from conservation of angular momentum
  4. Read areal velocity output (constant across orbit per second law) and period in years for verification against known astronomical data

Worked Example

Mars orbit: semi-major axis a=1.524 AU, eccentricity e=0.093. Simulator yields orbital period T≈1.88 years (matches observed value). Perihelion distance r_p=1.381 AU gives velocity v_p≈24.1 km/s; aphelion r_a=1.666 AU yields v_a≈21.9 km/s. Areal velocity remains constant at 0.0253 AU²/year throughout orbit, confirming Kepler's second law (equal areas swept in equal times).

Practical Notes

  1. Use eccentricity values: e<0.05 for quasi-circular orbits (Venus 0.007), 0.05–0.20 for moderately elliptical (Earth, Mars), >0.20 for highly elongated paths (Pluto 0.249, Halley's comet 0.967)
  2. Perihelion-to-aphelion speed ratio equals (1+e)/(1−e); verify this relationship in simulator outputs for error checking
  3. Areal velocity (h/2 where h is specific angular momentum) remains independent of position, validating central-force physics in solar system mechanics