Reproduce Halley's Comet (e=0.967), Earth (e=0.017) and other real orbits with one click. A general-purpose education simulator showing perihelion speed-up and equal-area law. Visit the Kepler's Laws simulator for theory, or the Kepler Equation simulator for the Newton-Raphson numerical solver.
Orbital Parameters
Semi-major axis a
AU
Eccentricity e
Simulation Speed
Display Options
Presets
Live Readouts
Orbital period T—
T²/a³ (= 1.0 exact)—
Current distance r—
Current speed v—
Perihelion r_peri—
Aphelion r_aph—
Results
—
Period T (years)
—
Speed (km/s)
—
Distance (AU)
—
T²/a³
Kepler
Yellow circle = Sun (focus) | Cyan triangles = equal areas (2nd law) | Arrow = velocity vector
So, Kepler's laws say planets move in ellipses. But what exactly do the "semi-major axis" and "eccentricity" sliders in this simulator actually control?
🎓
Great starting point! Basically, the semi-major axis (a) is half the longest diameter of the ellipse—it sets the orbit's size. Eccentricity (e) tells you how "squished" the ellipse is. Try moving the eccentricity slider from 0 to 0.9. At e=0, you get a perfect circle. As you increase it, the orbit becomes a more elongated ellipse, and the star moves off-center to a focus point.
🙋
Wait, really? So the star isn't in the center? And I see the planet speeds up and slows down. Is that one of Kepler's laws too?
🎓
Exactly! That's Kepler's Second Law, the "equal area" law. The planet speeds up when it's close to the star (perihelion) and slows down when it's far (aphelion). In the simulator, turn on the 'Equal Area Display'. You'll see triangular sectors swept out by the planet's path. Even though the shapes look different, each sector traced in the same time interval has the exact same area.
🙋
That's cool. So the third law, $T^2 = a^3$, is about orbital period. If I use the slider to make the semi-major axis bigger, does the simulator show the planet moving slower to match that law?
🎓
Precisely! The harmonic law relates orbit size to period. For instance, if you double the semi-major axis (a), the orbital period (T) increases by about 2.8 times ($2^{3/2}$). The simulator's physics engine uses numerical integration (like Verlet) to solve the equations of motion in real-time, so you can watch the planet's speed automatically adjust to obey all three of Kepler's laws as you change the parameters.
Physical Model & Key Equations
The orbit's shape is defined by the polar equation of an ellipse with one focus at the central star (the origin). This comes from solving Newton's law of gravitation.
$$r(\theta) = \frac{a(1-e^2)}{1 + e \cos \theta}$$
Here, $r$ is the distance from the star, $\theta$ is the true anomaly (orbital angle), $a$ is the semi-major axis, and $e$ is the orbital eccentricity (0 ≤ e < 1).
Kepler's Second Law states that the line joining the planet and star sweeps out equal areas in equal times. This is a consequence of the conservation of angular momentum.
$$\frac{dA}{dt}= \frac{L}{2m}= \text{constant}$$
Here, $dA/dt$ is the areal velocity, $L$ is the angular momentum, and $m$ is the planet's mass. A constant areal velocity means the planet moves fastest at perihelion ($\theta=0$) and slowest at aphelion ($\theta=\pi$).
Frequently Asked Questions
As the eccentricity e approaches 0, the orbit becomes circular; as it approaches 1, the orbit becomes a highly elongated ellipse. Increasing the semi-major axis a enlarges the entire orbit and lengthens the orbital period (Kepler's third law). You can observe these changes in real time by moving the sliders.
The planet moves faster near perihelion (closer to the Sun) and slower at aphelion. In the simulator, you can visually confirm through animation that the areas swept by the line segment connecting the planet and the Sun over equal time intervals are equal.
This tool is for educational purposes, designed to help intuitively understand Kepler's laws. Actual planetary motion is influenced by perturbations and relativistic effects, so precise orbit calculations require specialized celestial mechanics software.
For extremely elliptical orbits with eccentricity close to 1, or when the semi-major axis is set extremely small, numerical errors may increase. Additionally, if e ≥ 1, the orbit becomes hyperbolic, which is outside the model range of this simulator. The sliders are restricted to a safe range.
Real-World Applications
Satellite Orbit Design: Engineers use these exact principles to place communication and GPS satellites into specific orbits. By calculating the required semi-major axis and eccentricity, they can ensure a satellite has the correct orbital period and ground coverage.
Space Mission Planning: When sending a probe to Mars, mission planners use Kepler's laws to calculate the transfer orbit (a highly elliptical path called a Hohmann transfer). The simulator's parameters directly correspond to the variables they tweak for fuel-efficient trajectories.
Astrophysics & Exoplanet Discovery: Astronomers observe the wobble or dimming of a star to detect exoplanets. They use Kepler's laws to analyze the data, determining the exoplanet's orbital size (a), eccentricity (e), and mass from its gravitational influence.
CAE and Structural Dynamics: The Verlet integration method used in this simulator is part of the same numerical family (like Newmark-β) used in CAE software for simulating structural vibrations and crash dynamics. Understanding orbital mechanics builds foundational skills for complex dynamic system simulation.
Common Misconceptions and Points to Note
First, be wary of the misconception that "the simulator's orbit is forever stable." In the real solar system, gravitational influences from other planets (perturbations) cause orbits to deviate slightly from perfect ellipses. This tool deals only with the "two-body problem," so think of it as an ideal world with just the Earth and the Sun. For example, Jupiter's immense gravity significantly affects the orbits within the asteroid belt.
Next, pitfalls in parameter settings. If you set the eccentricity e to 1 or greater, the orbit becomes a parabola or hyperbola instead of an ellipse, and the planet will not return to the Sun. Understand that this is a tool for learning about "closed orbits" of planets. Also, setting the semi-major axis a too large can cause the planet to disappear from the screen instantly in the animation. A good tip is to use the default value of 1 (astronomical unit) as a reference and start by experimenting up to about 1.5 times Mars' distance.
Finally, the true meaning of the "equal area representation." The sector areas are equal because the time intervals are constant. However, this "constant areal velocity" law holds true only when the gravitational force (central force) from the Sun is the sole force acting. In practical satellite design, when atmospheric drag or solar radiation pressure are present, this law no longer applies. Being aware of the differences between the simulator's ideal environment and reality is the first step towards the next level.
Select Halley's Comet from the preset dropdown to auto-populate orbital parameters (semi-major axis a=17.9 AU, eccentricity e=0.967)
Adjust the semi-major axis slider (5–35 AU range) to observe period changes following Kepler's third law: T²/a³=1
Modify eccentricity (0–0.99 range) to see how orbital shape affects perihelion/aphelion distances and velocity extremes
Monitor real-time output: orbital period in years, speed in km/s at current position, instantaneous distance in AU, and the Kepler constant verification
Worked Example
Halley's Comet baseline: a=17.9 AU, e=0.967 yields T=75.3 years, perihelion speed≈54.5 km/s at 0.586 AU, aphelion speed≈0.91 km/s at 35.2 AU. Reducing a to 10 AU (Earth-like orbit) recalculates T=3.16 years; lowering e to 0.2 creates a nearly circular orbit with consistent 29.8 km/s velocity. The T²/a³ ratio remains 1.0 in all cases, confirming Kepler's invariant across the solar system.
Practical Notes
High eccentricity (e>0.9) produces dramatic velocity swings; Halley peaks at 54 km/s near perihelion but crawls at <1 km/s at aphelion—critical for mission planning
Asteroid belt objects (2–3.5 AU) with e=0.15–0.25 exhibit periods of 3–6 years; use this range to model near-Earth object trajectories
Venus-like orbits require a<0.73 AU; set e<0.015 to simulate near-circular paths used for atmospheric probe design
Verify T²/a³=1 output always equals unity; deviation indicates numerical error in the simulator engine