Skip to content

Simulates any number of bodies with gravitational forces

Notifications You must be signed in to change notification settings

blahnikkai/n-body-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N Body Simulation

Simulation

Smoothly simulates 100+ bodies of different masses affecting each other with gravitational forces

Each body has its own mass, position, velocity, and acceleration

Note that the simulation is at a 5x time scale

Adding bodies

Instantly add pre-made initial conditions like elliptical orbits, resonant orbits, binary star systems, and randomly initialized bodies

Add a body by simply clicking the simulation area to set position, mass, and initial velocity
Or if you want to add a body more precisely, use the 'Add a Body' form on the right side of the page.

Deleting bodies

Clear all bodies with the 'Clear All Bodies' button
Or delete an individual body by right-clicking it

Visuals and Camera

Move the camera with WASD and zoom in/out with +/- Reset the camera zoom and position with the 'Reset Camera' button Focus on a body by left-clicking it. To unfocus on it and reenter free camera mode, left-click the focused body.

Pause and play the simulation or step frame-by-frame

Use checkboxes to control whether acceleration and velocity vectors, debug information, or a path trace are drawn.

About

Simulates any number of bodies with gravitational forces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published