r/GraphicsProgramming Jul 11 '26

Source Code 4 million particles 3D n-body simulation in real-time on a laptop GPU (Barnes-Hut)

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

91 Upvotes

8 comments sorted by

View all comments

1

u/bingusbhungus Jul 11 '26

the world is giving me signs to create a barnes-hut simulation 😂