Skip to content
This repository has been archived by the owner on Oct 9, 2021. It is now read-only.

Latest commit

 

History

History
11 lines (7 loc) · 586 Bytes

README.md

File metadata and controls

11 lines (7 loc) · 586 Bytes

Barnes–Hut N-body simulation

View Here

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 point
  • renderBodies: render points with a circle proportional to the mass of each point
  • useBarnesHut: set to false to compare performance with a direct sum algorithm