To get a sense of how this force-directed layout works, drag the nodes or use the slider to adjust the force strength. A body simulation with the Barnes—Hut tree visually as blue boxes. I ran into a lot of issues, but everything is explained in the last section! Numerical integration. To calculate the net force on a particular body, the nodes of the tree are traversed, starting from the root.
nest...