Skip to content

A simple N-body simulation employing Newtonian gravity. Written using Matter.js.

Notifications You must be signed in to change notification settings

teuncm/nbody-gravity-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The simulation runs straight out of the box in your browser by opening index.html. Matter.js handles all collisions and integrations, while Newtonian gravity was implemented using the wikipedia on Newton's law of universal gravitation.

Future plans:

  • Render using WebGL with PixiJS
  • Implement Barnes-Hut to reduce complexity to O(n log n)

About

A simple N-body simulation employing Newtonian gravity. Written using Matter.js.

Topics

Resources

Stars

Watchers

Forks