Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 980 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 980 Bytes

$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