The orbit equation

This equation gives the distance between two bodies at each angle along the path. It describes their motion in an ideal two-body model of gravity.

r(θ)=p1+ecos(θ−θ0)

The same equation describes circles, ellipses, parabolas, and hyperbolas. Changing e changes which shape you get.

The variables

r
Distance between the two bodies.
p
Sets the size of the orbit.
θ
Angle around the central body.
θ₀
Sets the orientation of the orbit.
e
Eccentricity — the shape of the orbit.

How eccentricity changes the path

Eccentricity, e, tells us the shape of the path. For an ellipse, a value closer to 0 means a rounder orbit. As e approaches 1, the ellipse becomes more stretched.

e = 0
Circle.
0 < e < 1
Ellipse. It becomes more stretched as e increases.
e = 1
Parabola. The object passes the central body and keeps going.
e > 1
Hyperbola. The object also follows an open path and keeps going.

At e = 1, the path becomes open. The object passes the central body and continues away instead of returning around it. Values above 1 also give open paths.

Reading the demo

Move the slider to change e. The green dot is the central body, like the Sun. The dark dot is the moving object. The solid line is its path, and the dotted line shows the distance between the bodies.

Below e = 1, the object keeps orbiting. At e = 1 or above, it keeps going away. Open paths replay automatically to show the same pass again.

Elliptical · Closed orbit

Only part of each open path is shown. Size and timing are not to scale.

How this relates to the well

The well shows motion around a center. Earth’s gravity pulls the balls down the fabric, and friction slows them down. Planets have no surface beneath them, so the well is a way to explore curved motion rather than an exact model of an orbit.

Read the paper behind the equation →