This project attempts to accurately simulate the movement of celestial bodies due to gravity. The forces of gravity on each planet are automatically calculated, and each planet involved is taken into account.
For example, in a simple solar system with three bodies A, B, and C, planet A is pulled by both body B and C, and planets B and C are both pulled by A.
Scale was attempted to be considered but I found it to be unreasonable when attempting to simulate the vast space between the Earth and the Sun, so I decided on an approach without real life scale taken into account.
However, the gravitational constant G is the same as real life, as well as the equation used to calculate gravitational attraction.
I'm no physicist! This may be wrong (how I'm simulating things).
Made using p5.js & Vue JS Updated for summer 2021 Westerly STEM Camp