N-body barnes-hut simulation