Skip to content

An educational, interactive n-body simulator created using Python's plotting library 'Matplotlib.'

License

Notifications You must be signed in to change notification settings

alexsavino/mpl-n-body-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

N-Body Simulator Using Matplotlib

An educational interactive n-body simulator created using Python's plotting library 'Matplotlib.'

This simulation includes two massive objects, each with a mass of 1.591x10^66[kg] and velocities of magnitudes of 100[pc/s] directed in opposite directions perpendicular to the line connecting them. The reason that the mass of these two objects is so large is because you, the user, can position them however you like on a (200pc x 200pc) grid of flat spacetime - a huge amount of space! (A lightyear [ly] is roughly a third of a parsec [pc]!) Although it might be weird and unfamiliar at first, this educational tool is a good way to work towards developing a strong intuition about how the distance between two massive objects might influence the force of attraction experienced by each due to the prescence of the other, particularly on astronomical scales. Be warned that this code may run slow frame by frame, but that is only because these masses are being attracted to one another over incredible distances.

About

An educational, interactive n-body simulator created using Python's plotting library 'Matplotlib.'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published