|
|
|
|
|
by hermitcrab
398 days ago
|
|
I have run into the problem where a constant time step can suddenly result in bodies getting flung out of the simulation because they go very close. Your solution sounds interesting, but isn't it only practical when you have a small number of bodies? |
|
If you see bodies flung out after close passes, three solutions are available: reduce the time step, use a higher order time integrator, and (the most common method) add regularization. Regularization (often called "softening") removes the singularity by adding a constant to the squared distance. So 1 over zero becomes one over a small-ish and finite number.