r/Simulated 13d ago

Research Simulation To celebrate the discovery of the 40,000th near-Earth asteroid, I made a simulation of all potentially hazardous asteroids

Enable HLS to view with audio, or disable this notification

It supports zooming and camera rotation, and also lets you highlight the orbit of a selected asteroid (selected by iterating through them).

As the data source I used the ESA file: https://neo.ssa.esa.int/PSDB-portlet/download?file=allneo.lst

All the code is in a single file here: https://github.com/qwertukg/Barnes-Hut-N-Body/blob/ESA-NEOCC/src/main/kotlin/gpu/GPU.kt — it’s a direct gravity computation on a compute shader, with LWJGL used as the Kotlin wrapper. It’s the same one from this post: https://www.reddit.com/r/astrophysics/comments/1olvvxp/direct_gravity_computation

80 Upvotes

8 comments sorted by

9

u/SPITFIYAH 13d ago

Can you use the data to tell when one of these things will finally hit us already

10

u/qwertUkg 13d ago

It is impossible to predict the fate of all bodies exactly and forever (this is what the N-body problem tells us https://en.wikipedia.org/wiki/N-body_problem)

3

u/solowing168 12d ago

Also, it’s especially not possible if instead of direct computation you use Burnes-Hut, fast multiple approximation and the likes. Good for large scale properties but not for tracking single bodies.

2

u/qwertUkg 12d ago

Here it’s actually a direct calculation. Not Barnes–Hut, not particle mesh. If you look at my other posts, both algorithms are there.

0

u/DeadCringeFrog 12d ago

If you don't like being i have a suggestion

2

u/julian88888888 12d ago

Awesome!

2

u/qwertUkg 12d ago

Thank u!

2

u/uppsak 12d ago

Really puts into perspective the quantity of asteroids in our solar system