According to Newton's law of universal gravitation, two masses

and

attract one another with a force varying as the inverse square of the distance between them:

, where

is Newton's constant of gravitation. Orbits of attracting masses, including Kepler's laws of planetary motion, can be calculated on the basis of this force law. The left-hand graphic shows some possible trajectories of a "test mass"

, with

around a stationary mass

. The trajectories, shown as red curves, depend on the central mass

and the energy

of the test mass. When the test mass moves more slowly than the escape velocity, it spirals into the center. At higher energies, a stable orbit becomes possible in a progression of conic sections: circle, ellipse, parabola and hyperbola. (Hyperbolic orbits are not included here.)

Einstein's general theory of relativity gives a completely different picture of gravitation. It is not a force, per se, but rather a consequence of the curvature of spacetime. As John Wheeler said, matter tells spacetime how to curve while spacetime tells matter how to move. The right-hand graphic is a simplified representation of the curvature of spacetime caused by the mass

. This has been likened to a cannonball warping a mattress. The test mass then moves along a geodesic path in curved spacetime, which reduces to a straight line in the absence of curvature.