Kepler's 2nd Law Feature


As part of the continuing evolution of this demo of orbital motion, I've included a system that shows the area swept by a line from the planet to the orbiting moon over a half second of simulation time.  Since the time for the sweep is the same throughout the simulation, the area of the wedge swept out by the planet-moon line is also the same in accordance to Kepler's 2nd Law of Planetary Motion:

"A line drawn from a planet to the Sun will sweep out equal amounts of area in equal amounts of time."

Of course Kepler was only interested in planetary orbits, but his laws are applicable to any two-body orbital system.  The visibility of this swept area can be toggled on or off with the UI button "Swept Area" along the top of the screen just right of center.

In addition to the swept area mechanic, I also changed the camera motion to be controlled by holding down the right mouse button and dragging rather than the left.  When using the left mouse button for camera motion, I noticed that the camera view would frequently change when a UI button was pressed.  Now the two control systems are disconnected and will not interfere with each other.

More changes are coming, but now most of those changes will be cosmetic in nature rather than fundamental changes or implementation of mechanics.

Files

Two-Body-Orbit_Build.zip Play in browser
Sep 08, 2019

Get Planetary Motion Demo

Leave a comment

Log in with itch.io to leave a comment.