

N-body Toy - david4096
http://resium.com/n-body-toy/

======
jloughry
The encoding of kinetic energy in the colour of the particle trails is
innovative.

Did you encounter the effect I call "lost" momentum that occurs around very
close approaches when the time quantum is constant? It manifests by particles
seeming to gain kinetic energy over time until they fly away. One way of
minimising it is to switch to a more precise and accurate force calculation
whenever the distance between two particles becomes less than $\epsilon$.

~~~
david4096
Yes, since the particles are point-like we should expect the force between
them to grow without bound if they are very near.

I find the calculation for small distances to be unpredictable, one easy way
to test it is to place two particles with small gravity and a large attractive
charge. Occasionally close passes cause explosive motion, while other times it
hardly overcomes gravity.

