Note that the description below is not complete
Modelling solar systems using numerical methods and Newtonian physics. A PyGame is made to display the motion of the planets of our solar system. Different controls are added to speed up the simulation or to increase the gravitational force, or to change the perspective to where Earth is the centerpoint of the solar system.
The most important law is the second law of motion:
The implicit euler forward method is applied to get a reasonably stable numerical result. To do so, the second order ODE needs to be translated into a system of first order ODE's, which can be solved:
When two distinct objects are close, i.e., their euclidean distance is smaller than a given contant, we model this as a collision. Physical laws such as conservation of momentum need to be respected. In short, this means that the combined momentum before the collision must equal the momentum after the collision. Say the objects have masses