3 ms·
Excellent work. Is this based on simple Newtonian gravity applied over a uniform time-step, or something more sophisticated?
by hermitcrab 1y ago
Excellent work. Is this based on simple Newtonian gravity applied over a uniform time-step, or something more sophisticated?
- JKCalhoun 1y agoFor accuracy, time step can get smaller when bodies are closer.
- hermitcrab 1y agoYes, but this would slow the simulation right down if 2 bodies are very close. I think people sometimes use a 'fudge factor', e.g. if distance < x then treat distance as x.
- hermitcrab 1y ago>'fudge factor' Maybe that is what the 'softening' parameter relates to?
- jgchaos 1y agoYes, the softening factor keeps the forces from getting too big when bodies get close together. Better for the visualization but not very accurate to leave it in.
- hermitcrab 1y agoBetter than things flying off to infinity or the whole simulation slowing right down.
- constantcrying 1y agoWhat you describe is the Euler method, which is well known for being a comparatively bad choice in most situations. The ODE solver can be selected, the default is RK4, which is a Runge–Kutta method of 4th order, it computes the next time step by combining the values at 4 previous time steps.
- hermitcrab 1y agoI see it now, under the 'Advanced' options.