5 ms·
Thank you, it's really cool! I started something similar, but way less sophisticated. Basically i implemented a n-Body solver in Julia, compiled it to Webassemb
by lagrange77 2y ago
Thank you, it's really cool!
I started something similar, but way less sophisticated. Basically i implemented a n-Body solver in Julia, compiled it to Webassembly and did the drawing with canvas, like you. This motivated me to work on it again.
> The issue with ksp is that you first need to figure out the rocket design before you start on orbital mechanics
Come on, it's not rocket science.
- nico 2y ago> a n-Body solver in Julia, compiled it to Webassembly and did the drawing with canvas Awesome, do you have GitHub repo with the code? or a website with it running? would love to see it
- lagrange77 2y agoUnfortunately not, i couldn't solve some (numerical) stability issues and i buried it in my "dev directory". But if i'll get it presentable, i'll be doing a Show HN.
- nico 2y agoThank you. It would be great if you posted it! I’ve been simulating some halo orbits and also running into stability issues It seems it’s pretty typical and depends on the integration method used, as well as the timestep In general it is quite a hard problem to solve. Mathematically, it’s a very difficult problem. But also computationally, it is almost impossible to fully simulate an n-body system without getting chaotic orbits. Then you have to either cheat (by manually tweaking trajectories) or just picking a pretty small time range for the simulation
- lagrange77 2y agoExactly. What i also learned was, that i had to take a (primitive) collision detection into account. Otherwise bodies can come so close to each other, that the gravitational forces can go very high or even to (machine) infinity.