Live data from Hacker News

Show HN: Browser-based interactive 3D Three-Body problem simulator

trisolarchaos.com

11–20 of 119 posts

Re: Show HN: Browser-based interactive 3D Three-Body problem simulator

#13

This is amazing! Nicely done! I did something similar, mostly 2D here: https://www.nhatcher.com/three-body-periodic/ (Mine is just unfinished)

I would be very curious to compare notes on the integrators you used. How good do they perform in general?

In the avobed shared you can go to the settings a pick an integrator. I did the integrators in wasm although I suspect js is just as fast.

Color me impressed! I love the ammount of settings you can play with. I still need to understand what happens whe yu add more bodies though.

Re: Show HN: Browser-based interactive 3D Three-Body problem simulator

#15

No physics expert but isn't this unpredictable (based on what I saw in series) ? Amd this does seem predictable, I saw this for almost a minute

The link points to one of the stable solutions, and there are actually quite a few of those. The problem is that there’s no general closed form that tells us exactly where the bodies will be in the future, so we rely on numerical methods to approximate the motion. If you hit Reset All a few times or add more bodies, you’ll start to see the chaos

Re: Show HN: Browser-based interactive 3D Three-Body problem simulator

#16
I spent a long time playing with the sim. Nice work.

Most of the random data sets that I ran ended up with a two body system, where the third body was flung far into space never to return. However, some of these were misleading. I had one running for 15 minutes at 5x, and the third body did eventually return.

Re: Show HN: Browser-based interactive 3D Three-Body problem simulator

#17

This is amazing! Nicely done! I did something similar, mostly 2D here: https://www.nhatcher.com/three-body-periodic/ (Mine is just unfinished)

Thank you! Your 2D version is great, I love seeing how different people approach this stuff. As for integrators, I currently only have Velocity Verlet and RK4 (can change in the advanced settings). I started with just Verlet, but to get some of the presets to behave properly I ended up needing RK4 as well. I’ve been thinking about adding adaptive methods next, but I'll take a look at the methods you've got listed too. Everything is still running in plain JS for now. I started moving some of the work into web workers but haven’t finished that part yet.

Re: Show HN: Browser-based interactive 3D Three-Body problem simulator

#19
post #16

I spent a long time playing with the sim. Nice work. Most of the random data sets that I ran ended up with a two body system, where the third body was flung far into space never to return. However, some of these were misleading. I had one running for 15 minutes at 5x, and the third body did eventually return.

It might be fun to add some kind of visualization showing when a body has enough energy to potentially escape the system.

Re: Show HN: Browser-based interactive 3D Three-Body problem simulator

#20
post #15

No physics expert but isn't this unpredictable (based on what I saw in series) ? Amd this does seem predictable, I saw this for almost a minute

The link points to one of the stable solutions, and there are actually quite a few of those. The problem is that there’s no general closed form that tells us exactly where the bodies will be in the future, so we rely on numerical methods to approximate the motion. If you hit Reset All a few times or add more bodies, you’ll start to see the chaos

There actually is an analytical solution using a power series that actually converges (Karl Sundman's work). Unfortunately, the universe still mocks our attempts. Though the series converges, it does so incredibly slowly. From Wikipedia:

The corresponding series converges extremely slowly. That is, obtaining a value of meaningful precision requires so many terms that this solution is of little practical use. Indeed, in 1930, David Beloriszky calculated that if Sundman's series were to be used for astronomical observations, then the computations would involve at least 10^8000000 terms.

Post reply on HN