Implement quadtrees and physics for the Barnes-Hut algorithm