Skip to content

shree675/n-body_Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

$n$-body Simulation

About

This is an approximate simulation of n celestial bodies in 3D space under the influence of each others' gravitational force. It tries to simulate the unpredictable trajectories of an n-body system. The motion is always chaotic $\forall n \geq 3$.

Each body has the same mass and starts with 0 velocity, but the following parameters are configurable in code:

  1. mass of each body
  2. number of bodies
  3. initial positions and velocities of bodies

Note

Configuring initial positions and velocities in the code currently requires some manual effort.

Demonstration

For a 3 body system: 3body

For a 6 body system: 6body

Caution

This simulation is approximate and the performance tends to degrade over time.

Version

v1.0

Releases

No releases published

Packages

No packages published

Languages