Web Analytics
Kepler's laws – planetary motion simulation

Kepler's laws – planetary motion

At the beginning of the 17th century the German astronomer Johannes Kepler studied very precise measurements of the position of Mars collected by Tycho Brahe. After years of calculation he discovered three simple rules that all planets follow – Kepler's laws. Half a century later Isaac Newton showed that all three laws follow from his law of gravitation.

Simulation

Choose a planet or set the semi-major axis a and the eccentricity e of the orbit yourself. The simulation calculates the motion from Newton's law of gravitation. The coloured sectors show the area swept by the Sun–planet line in each twelfth of the period (the second law), and the green arrow is the velocity of the planet. One orbit in the simulation takes about 10 seconds.

Kepler's first law – the law of ellipses

The planets move in ellipses, with the Sun at one focus of the ellipse.

An ellipse is a “flattened” circle. Half of its longest diameter is the semi-major axis a, and how flattened it is is shown by the eccentricity e (e = 0 is a circle, e close to 1 is a very elongated ellipse). The point of the orbit closest to the Sun is the perihelion (distance a(1 − e)), and the farthest is the aphelion (a(1 + e)). The orbits of the planets are almost circular (Earth: e = 0.017), while the orbits of comets are very elongated (Halley's comet: e = 0.967).

Kepler's second law – the law of areas

The line joining the Sun and a planet sweeps out equal areas in equal times.

That is why a planet moves faster near the Sun (at perihelion) and more slowly far from it (at aphelion): a narrow, long sector has the same area as a short, wide one. Earth is at perihelion in early January (about 30.3 km/s) and at aphelion in early July (about 29.3 km/s). At perihelion and aphelion rp · vp = ra · va. In the simulation: choose Halley's comet and watch it rush past the Sun, while far away it almost stands still.

Kepler's third law – the harmonic law

The squares of the orbital periods of the planets are proportional to the cubes of the semi-major axes of their orbits.

T² / a³ = const        (with T in years and a in AU:  T² = a³,  T = a^1.5)

The astronomical unit (AU) is the mean distance of the Earth from the Sun, about 150 million km. The farther a planet is from the Sun, the longer its period – and it grows faster than the distance.

planeta (AU)T (years)T² / a³
Mercury0.3870.2411.00
Venus0.7230.6151.00
Earth1.0001.0001.00
Mars1.5241.8811.00
Jupiter5.20311.861.00
Saturn9.53729.451.00

In the simulation: compare the “period from the 3rd law” and the “measured period” – they match, even though the simulation only uses the law of gravitation.

Newton's law of gravitation

Newton explained why the planets obey Kepler's laws: the Sun attracts a planet with a force

F = G · m · M / r²

that weakens with the square of the distance. From this one force come the ellipses, the law of areas (the force always points towards the Sun) and the third law. The same force keeps the Moon around the Earth and artificial satellites in orbit.

Problems

Use T² = a³ (T in years, a in AU). Solve the problem, then check the solution (and in the simulation).

  1. An asteroid has a semi-major axis of 4 AU. What is its orbital period around the Sun?
    Solution

    T = 4^1.5 = √(4³) = √64 = 8 years.

  2. A body orbits the Sun in 27 years. What is the semi-major axis of its orbit?
    Solution

    a³ = T² = 729, so a = ∛729 = 9 AU (roughly like Saturn).

  3. The semi-major axis of the orbit of Halley's comet is 17.8 AU. After how many years does it return?
    Solution

    T = 17.8^1.5 ≈ 75 years. It was last near the Sun in 1986, and the next time will be in 2061.

  4. At perihelion, 0.5 AU from the Sun, a comet has a speed of 50 km/s. What is its speed at aphelion, 5 AU away?
    Solution

    From the second law at perihelion and aphelion: rp · vp = ra · va, so va = 0.5 · 50 / 5 = 5 km/s – ten times slower.

  5. An orbit has its perihelion at 1 AU and its aphelion at 3 AU. What are the semi-major axis, the eccentricity and the period?
    Solution

    a = (1 + 3) / 2 = 2 AU; e = (3 − 1) / (3 + 1) = 0.5; T = 2^1.5 ≈ 2.83 years. Set a = 2 and e = 0.5 in the simulation and check.

Check your knowledge

1. What shape are the orbits of the planets?

2. Where does a planet move fastest?

3. The semi-major axis of an orbit is 4 times larger. The orbital period is larger by:

4. What does Kepler's third law state?

5. An orbit has eccentricity e = 0. It is:

Related: circular motion (centripetal force) and the Sun, Earth and Moon animation in p5.js.

🛠 Build this kind of simulation yourself: Sun, Earth and Moon – animation in p5.js

💻 Program it yourself in p5.js: Kepler orbits in p5.js – gravity step by step

👩‍🏫 For teachers – lesson plan

Kepler's laws – for teachers – lesson plan

Level: Secondary school (gravitation); extension work and astronomy club for ages 13–14

Lesson goals

  • the student describes an orbit by its semi-major axis, eccentricity, perihelion and aphelion
  • explains the law of areas and why a planet is fastest at perihelion
  • applies Kepler's third law T² = a³ and links Kepler's laws to Newton's law of gravitation

Suggested lesson flow (45 min)

  1. Introduction (10 min): a question from everyday life, then the theory and formulas on this page.
  2. Work with the simulation (15 min): the activity below, in pairs.
  3. Tasks (10 min): the tasks on this page; students check their answers in the simulation.
  4. Check your knowledge (5 min): the quiz at the end of the introduction.
  5. Discussion (5 min): the questions below.

Activity with the simulation

For Mercury, Earth, Mars and Jupiter students read the measured period from the simulation and calculate T² / a³; then for Halley's comet they compare the speed at perihelion and aphelion and check r · v = const. Finally they change the eccentricity at the same a and conclude that the period depends only on the semi-major axis.

Discussion questions

  • Why is it summer in the northern hemisphere even though the Earth is then farthest from the Sun?
  • How would the Earth's period change if it were twice as far from the Sun?