3 ms·
Uses the Barnes-Hut algorithm to avoid O( n^2 ) force calculations in favor of O(n log n). Simple nearest neighbor tracking cannot be use in gravity simulation
by petermcneeley 8y ago
Uses the Barnes-Hut algorithm to avoid O( n^2 ) force calculations in favor of O(n log n). Simple nearest neighbor tracking cannot be use in gravity simulations as gravity has an effective infinite ranged potential. https://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation https://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation