In physics, the n-body problem is the problem of predicting the individual motions of a group of celestial objects interacting with each other gravitationally. Solving this problem has been motivated by the desire to understand the motions of the Sun, Moon, planets, and visible stars. (Wikipedia).
Use the algorithm/code described in the " Astrophysics: N-Body Simulation in Python" video.
Convert from VPython to graphics.py (graphics library).
See VPython
.
Is there a different graphics library you would rather use for this project?
n-body problem (Wikipedia)
Astrophysics: N-Body Simulation in Python (YouTube)
Python Physics: Using Web VPython to Illustrate a Physics Question (YouTube)
These equations are not needed for this project but may help you understand the code better.
Note: A mass accelerating at 32 f/s2 will travel 16 feet in one second, not 32 feet.
Note: Newton's first law states that every object will remain at rest or in uniform motion in a straight line unless acted on by an external force.
Momentum is a measure of how much motion an object has. It is determined by its mass and velocity. Essentially, it reflects how difficult it is to stop a moving object, with more momentum indicating greater resistance to change in motion. (e.g. A truck is harder to stop than a bicycle.)
A force applied to an object for a specific time interval will cause a change in its momentum.
In other words, To change the momentum of an object, you need to either change its mass or its velocity, or both.