applying barnes hut spatial subdivision n-body algorithm for coulombs law