Gravity · WebGPU · Up to a million stars
Two spiral galaxies pass each other and tear out tidal tails and bridges, up to a million stars on your GPU. Spin the discs the other way and almost nothing happens: the result that explained the Mice and the Antennae.
Some galaxies trail long, thin streamers of stars, like the Mice, about 300 million light-years away, and the Antennae, somewhere between 45 and 80 million depending on how it is measured. For decades they were a puzzle. In 1972 the brothers Alar and Juri Toomre showed they are tides: when two galaxies swing past each other, each pulls harder on the near side of the other than on its far side, and the stars on both sides get flung out, one stream toward the other galaxy (a bridge), one away from it (a tail).
Their model was deliberately simple, and it is the one running here. Each galaxy is a heavy core, and its stars are a disc of weightless test particles circling it. The cores swing past each other on an open orbit, and every star simply follows the two cores' gravity. A million stars cost almost nothing, because each feels only two masses.
Try Prograde and then Retrograde. The only difference is which way the main disc spins. When its stars orbit the same way the other galaxy passes, they keep pace with the passer-by for a while and feel its pull for much longer, enough to be torn away. Spin the disc the other way and the companion rushes past too quickly to do much. That asymmetry, plain in the Toomres' figures, is why long tails need a prograde encounter.
The Mice and The Antennae use the orbits and disc tilts the Toomres published for those two pairs. Drag to look at them from the angle we see them on the sky.
Everything is in model units: the closest approach is one unit of distance and each core's mass is one. For two galaxies of a hundred billion suns each passing 25 kiloparsecs apart, one time unit is about 190 million years, so a whole encounter takes a billion years or more. The clock shows both.