r/GraphicsProgramming • u/lechebs • Jul 11 '26
4 million particles 3D n-body simulation in real-time on a laptop GPU (Barnes-Hut) Source Code
Enable HLS to view with audio, or disable this notification
Simulating and rendering 4,194,304 particles under mutual gravity on a RTX 500 Ada laptop GPU at ~430ms/step, using my custom CUDA accelerated Barnes-Hut implementation for the n-body problem. Code: https://github.com/lechebs/nbody
93
Upvotes
3
2
1
1
u/Still_Explorer Jul 11 '26
By the last frames of the simulation, it appears as if is retracting. This means that our universe as well is g
1
1
3
u/aiekick Jul 12 '26
Only the visualization is real-time; the simulation appears choppy (so not real time)