Overview
Barnes-Hut Simulation builds a quadtree or octree, summarizes distant cells by their center of mass, and uses that summary when a cell is sufficiently far from the body being updated.
Approximates many-body forces by grouping distant bodies in a spatial tree.
Compact metadata for implementation and discovery.
Barnes-Hut Simulation builds a quadtree or octree, summarizes distant cells by their center of mass, and uses that summary when a cell is sufficiently far from the body being updated.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n log n)
Worst
O(n^2)
Space
O(n)
s / d < thetaApproximates a distant cell when its size is small relative to distance.
Show approximating distant particle groups with a hierarchical tree on a small approximate n-body simulation example.
Barnes-Hut Simulation operates in O(n log n) time and O(n) space within the N-Body Simulation family. Key governing relation: s / d < theta. Often compared with Fast Multipole Method and Verlet Neighbor List.
What each reference supports for this entry.
Original Barnes-Hut paper supporting hierarchical force approximation for n-body simulation.
Open sourceSimulation reference covering Barnes-Hut Simulation integration, particle update, constraint, or animation workflow.
Good next jumps from the relationship graph, ranked for useful discovery.
Simulation · Core
Both use n-body simulation ideas for related approximate n-body simulation problems.
Compare with thisBoth use n-body simulation ideas for related approximate n-body simulation problems.
Both use n-body simulation ideas for related approximate n-body simulation problems.
Both use n-body simulation ideas for related approximate n-body simulation problems.