Friction is what lets galaxies merge. Set it to zero for the pure 1972 model, where they pass and part forever. 4M stars and up want a real graphics card.
mass
a gravitational sandbox
Galaxy Collider
Millions of stars. Real gravity. Time you can run backwards.
drag to orbit · scroll to zoom · space to pause · H hides everything
The science, honestly
Every point of light is a star particle moving under gravity, integrated on your graphics card about 120 times a second. Nothing is pre-rendered or keyframed: the tails, bridges, rings and shells emerge from the equations.
What is real
The method. This is the restricted N-body technique of Alar and Juri Toomre's 1972 paper “Galactic Bridges and Tails”, which first showed that the strange filaments around peculiar galaxies are simply tides. Each galaxy is a mass distribution on an orbit; its stars are test particles that feel every galaxy's pull.
The galaxies. Each one is a dark-matter halo plus a stellar component (two Hernquist profiles) scaled from the Milky Way: 1012 solar masses, a 3 kpc disc scale length, a rotation speed near 210 km/s. Distances, speeds and times on screen are in real units.
The encounters. The Antennae, the Mice and the Whirlpool use the orbit shapes and disc tilts published by the Toomres. The Milky Way–Andromeda run follows the orbit of van der Marel et al. (2012): first pass near 4 billion years, merger about 2 billion later.
The integrator. A leapfrog scheme that is time-reversible, which is why you can run the collision backwards and watch two wrecks reassemble into spirals. In a test run of 1.2 billion years forward and then back, the average star returned to within about 4 light-years of where it started.
The picture. Rendered in high dynamic range and compressed with the asinh stretch astronomers use on survey images, so faint tails and bright nuclei fit in one frame.
What is approximated
Stars do not attract each other. They respond to the galaxies' smooth potentials only. That is cheap enough for millions of stars and gets tidal features right, but merged remnants keep more memory of their discs than real ones do.
Friction is a formula. In nature, galaxies merge because they transfer orbital energy to each other's dark halos. Here that is a Chandrasekhar-style drag on the galaxy centres with a tuned strength. Set it to zero in settings to get the pure 1972 model.
Starbursts are painted on. Young blue clusters and pink hydrogen clouds brighten when a galaxy is tidally stressed. Real collisions do trigger star formation, but there is no gas physics here.
Andromeda may miss. Sawala et al. (2025) find only about even odds of a merger in the next 10 billion years once the Magellanic Cloud and M33 are included. You are watching one of the futures where it hits.
Controls
drag orbit · scroll / pinch zoom · right-drag pan space play · R reverse · [ ] speed · ← → skip 100 Myr · 1–8 encounter L labels · T colour by galaxy · D director camera · M sound · P save image · F fullscreen · H hide interface