Barnes-Hut Algorithm
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Barnes-Hut-Algorithm
image
.gitattributes
.gitignore
README.md

README.md

Barnes-Hut-Algorithm [Unity - C#]

This simulator uses the Barnes-Hut algorithm to simulate gravity on n bodies. It is notable for having order O(n log n) compared to a direct-sum algorithm which would be O(n2).

Performance

This solution, using Barnes-Hut, perform better than the brute force solution.
Despite approximation the behavior remain very similar to the brute force.

Drawing
Execution time for N Body N->[1-1000], 10 mesures per N.

Quad-Tree and Center-Gravity visualisation.

Drawing

More

The Barnes-Hut Algorithm article by Tom Ventimiglia & Kevin Wayne, was really useful for me to have a good understanding of the Barnes-Hut-Algorithm.
My friend Martin Magakian was building a Barnes-Hut in Rust.

License

License
Licensed under Creative Commons Attribution 4.0
http://creativecommons.org/licenses/by/4.0/