Tried writing an electrostatic particle simulator in Turbo Pascal 7 with BGI as a teen, a handful of particles before it crawled. Then saw a galaxy collision sim on a CD-ROM magazine disc handling thousands of bodies smoothly. Thought it was assembly tricks.. now I'm sure it's algorithmic (avoiding N**2 runtime) but never dug into the specifics. Are charges vs gravity sims essentially the same n-body problem?

EGAVGA.BGI

Oh this brings memories. I have tried to create a little bit of 3D→2D renderer in TP 6.0 but precision was never enough for nodes to not fall apart and 80286 speed was too slow to render anything meaningful except maybe a cube.

>Are charges vs gravity sims essentially the same n-body problem?

The force falls off as the inverse square of distance in both cases. So they are essentially the same problem. Except that charge can attract or repel and gravity (as far as we know) only attracts.

They might have been using the fast multipole expansion method

[deleted]