Let's now simulate gravity. We will simulate the movement of four planets (Mercury, Venus, Earth, and Mars), and our very own Moon, using Newton's law of universal gravitation.
Our simulation assumes the Sun at the center, but it does not draw an oval for the Sun as that would make our planets invisible at that scale. Our simulation programs shows the four planets and moon revolving in circular orbits (8.07_gravity_simulation.py):
While the system could be extended to include other planets from the solar system - putting them all on the rectangular window of our screen would not be possible as the differences in planet sizes and distances are so disproportionate that making one planet, such as Jupiter, show up would make sizes and distances of planets such as Earth smaller than a pixel, making them invisible. So our visualization sticks to just the...