N-body simulation using the Barnes-Hut algorithm in javascript.
You can configure some options in main.js.
drawVelocity
: draw a vector to represent the velocity of each pointrenderBodies
: render points with a circle proportional to the mass of each pointuseBarnesHut
: set to false to compare performance with a direct sum algorithm