Quad Tree data structure for Barnes-Hut simulation in 3d space