How to make this gravity simulator?

David is right about Kangaroo 2 being mainly designed for finding static solutions.
The solver method in the old version was actually better at strict energy preservation like you need for calculating orbits.
I chose to go with a different solver in k2 because for the vast majority of applications I had in mind, stability and convergence to the minimal energy state was more important, so the solver reducing energy was actually a good thing, and even for dynamic simulations, some drag was usually wanted.

I’ll try and dig out some old gravity examples made with the old version, but I’m also going to have another look at whether there would be a way to include an option in the new version for an energy preserving integrator (even if it is less stable).

4 Likes