Orbital mechanics lesson

How do orbits work?

An orbit happens when gravity continuously bends an object's forward motion. The object keeps falling toward the body it orbits, but it moves sideways quickly enough to keep missing it.

Beginner · About 10 minutes · Runs in your browser

Try it in Luna See an orbit around two stars

An orbit is a continuous fall

Without gravity, a moving planet or spacecraft would continue along a straight path. Gravity accelerates it toward a star or planet. When the object also has enough sideways velocity, the direction of its motion keeps turning before it can hit the central body. It falls around the body instead of straight into it.

Prediction

If Earth suddenly lost all sideways velocity but kept the same position, what path would it take? Make a prediction before reading on.

Earth would begin falling toward the Sun. Its present orbit depends on both the Sun's gravitational pull and Earth's sideways motion. “Gravity versus motion” is a useful picture, but these are not two forces balancing to zero: gravity keeps accelerating Earth by changing the direction of its velocity.

Why most bound orbits are ellipses

In the ideal two-body problem, a gravitationally bound object follows an ellipse. A circle is the special case with zero eccentricity. In any eccentric orbit, the object is closest at periapsis* and farthest at apoapsis*; the more elongated the ellipse, the larger the difference.

* Periapsis: the point on an orbit closest to the body being orbited. Around the Sun it is called perihelion, around Earth perigee.

* Apoapsis: the opposite point, farthest from the body being orbited. Aphelion around the Sun, apogee around Earth.

Speed is not constant along an eccentric orbit. The object moves fastest near periapsis and slowest near apoapsis. This follows from conservation of energy and angular momentum and is described geometrically by Kepler's second law: a line from the central body to the orbiting body sweeps equal areas in equal times.

Kepler's three laws in plain language

  1. Shape: a planet's ideal orbit is an ellipse with the star at one focus.
  2. Changing speed: the planet sweeps equal areas in equal times, so it travels faster when it is closer.
  3. Period and distance: larger orbits take longer. For objects orbiting the same dominant mass, the square of the period is proportional to the cube of the semi-major axis.

Newton later explained why these patterns emerge from universal gravitation. His generalized form also accounts for both orbiting masses, which matters for binary stars and other systems where neither object is negligible.

The seven TRAPPIST-1 planets in Luna, spaced at increasing distances from a small red dwarf star, above a grid showing the star's gravity well
The third law at a glance: the seven TRAPPIST-1 planets in Luna. The innermost completes a year in about 1.5 days, the outermost in about 19, and every one of those orbits would fit inside Mercury's.

Real systems contain more than two bodies

The exact ellipse is an idealization. In a real planetary system, every mass attracts every other mass. Jupiter perturbs other planets; a moon tugs its planet; two stars orbit their common center of mass. These smaller interactions can shift orbital elements, create resonances, or produce chaotic outcomes.

Luna calculates these mutual gravitational effects for simulated bodies. That is why adding a massive object can alter bodies that were already present. The motion is the output of the simulation rather than a fixed visual loop.

Try it in the simulator

  1. Open Luna and select a planet. Observe its current speed and path before changing anything.
  2. Add a new object well away from the planet. Start with a small mass and watch the planet complete one full orbit.
  3. Increase the new object's mass. Compare the path again and look for movement in both bodies, not only the new one.

Change one variable at a time. That makes it possible to connect an observed difference to mass, distance, or velocity instead of guessing which edit caused it.

For orbital geometry with a date attached to it, the total solar eclipse of August 12, 2026 puts the Moon between Earth and the Sun at a specific hour, and you can watch the shadow land from any city.

What this model leaves out

The explanation above begins with Newtonian gravity. That model is excellent for ordinary planetary systems, but very strong gravity and precision astronomy can require general relativity. Numerical simulation also advances time in finite steps, so results have limited precision and depend on the chosen time scale and integrator.

For further reading, see NASA's introductions to orbits and Kepler's laws and gravity and mechanics.