New UI With Physical Units


For a long while now, I've liked the initial development of this demo as a way of demonstrating Kepler's First and Second Laws of Planetary Motion, but it lacked the ability to demonstrate the third law.  This deficit was primarily due to my using arbitrary units and not physical units in the simulation.  This most recent update corrects that as well as providing a significantly upgraded UI system.  

All distances are now presented in astronomical units (AU), all velocities are in km/sec (KPS), and all energies in MJ/kg.  These are, as they were before, specific energies, that is energy per unit mass.  The simulation assumes that the central star is our. With this, one can enter the perihelion or aphelion distance of any given planet, asteroid, KBO, comet, or Sun-orbiting spacecraft, and its velocity at that point and model its orbital trajectory.  If it is a closed orbit, the orbital period in years will be displayed.

New Features:

  • Improved UI
  • Ability to enter an initial distance as well as initial velocity
  • Orbital period is now calculated
  • Data are presented in physical units
  • Both the swept area and the orbital trail visibility can be toggled on or off via UI buttons.

Kepler's 1st Law:

"A planet moves in elliptical orbits with the Sun at one focus."

Changing the initial velocity and distance will generate different orbital trajectories.  If you remain below the escape velocity, then you will achieve an elliptical orbit. Using the periapsis and apoaspis distances, one can calculate the eccentricity and verify the presented value.

eccentricity = (apoapsis - periapsis) / (apoapsis + periapsis)

With the kinetic, potential, and total energies also presented, one can also discuss the energies required for a circular, an elliptical, a parabolic, or a hyperbolic orbit or trajectory.

  • Circular orbits:  KE = - 1/2 * PE, Etot = 1/2 * PE
  • Elliptical orbits: Etot < 0
  • Parabolic Trajectories: Etot = 1
  • Hyperbolic Trajectories: Etot > 1

Kepler's 2nd Law:

Doing quantitative work with Kepler's 2nd Law is challenging.  Here we limit the experience to a qualitative nature.  The swept area presented is rendered over 0.5 real seconds.  This time period for the swept area is the same throughout the orbit, so for eccentric orbits, one will note that the width of the swept area increases as it's length decreases.  One may also note the observable increase in speed as the planet approaches the Sun as well as the increase in kinetic energy.  It is important to note that the total energy remains unchanged.

Kepler's 3rd Law:

With both the periapsis and apoapsis as well as the orbital period displayed, one can use the periapsis and apoaspsis to calculate the semi-major axis of the ellipse and then use Kepler's 3rd Law to calculate the orbital period.  Kepler's 3rd Law states 

P2 = K * a3,

where P is the period and a is the semi-major axis.  If we measure the period in years and the semi-major axis in AUs, then Kepler's Constant, K, is equal to one and can therefore be numerically ignored, leaving us with the following relationship:

Pyr2 = aAU3

To get the semi-major axis, one can first find the major axis by adding the periapsis and apoaspis distances and dividing by two,

a = 1/2 * (periapsis + apoapsis)

Get Planetary Motion Demo

Leave a comment

Log in with itch.io to leave a comment.