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.
Symplectic integrators are the approach I used for some old galaxy simulations. Page 5 on the attached paper was my main reference, eq 22
https://arxiv.org/pdf/cond-mat/0110585
I believe this is used in several academic codes for long term N-body calculations.
I'm not sure which ones are you talking about specifically. But there are some with some heavy symmettrical patterns indeed. To my eyes some are mesmerizing to watch.
The orbits are computed in real time, so yeah what you are seeing (modulo errors in my code is genuine)
There are some caveats though. Some orbits are periodic only in a rotating frame of reference.
EDIT: you can share the URL and I can see which orbits you are talking about
I started with basic Newton-Raphson solver too but found cases where it diverges but Excel somehow doesn't, so concluded that Excel has some kind of extra logic to handle more cases, so I also bolted on more fallback logic.
Interesting, yeah. I guess he was the mathematical equivalent of the "rogue" archetype. Brilliant, did things in his own way, total lack of respect for authority, shrouded in mystery. I can definitely see the appeal =)
If you are interested in this subject I always recommend Anna Frebel's book: "Searching for the Oldest Stars". Can't believe is over a decade old now, time flies. Still one of the most beautiful book on popular science out there.
It is amazing to see how we can actually be pretty sure we are seeing second generation stars. And more in general the theory of stellar evolution in really interesting
I did something similar, mostly 2D here:
https://www.nhatcher.com/three-body-periodic/
(Mine is just unfinished)
reply