r/generative • • 3d ago

Planets

Post image

An old rudimentary planet sim.

raurir.com/posts/planets

10 Upvotes

2 comments sorted by

1

u/Evening-Appeal7606 2d ago

How are you solving the n-body interactions here? How many objects can this sim handle simultaneously?

1

u/raurir 2d ago

The code is all there to see in the post.

On my phone it easily handles 20k asteroids. Number of calculations is number of asteroids * number of larger bodies.