Galaxy Collision Simulator illustration

Galaxy Collision Simulator

Two disk galaxies fly past each other and merge, modelled the way Toomre & Toomre did in 1972: the two heavy cores orbit each other under softened gravity, integrated with a leapfrog scheme, while thousands of massless tracer stars — each started on a circular orbit in a rotating disk — feel the pull of both cores. Set the number of stars per galaxy, the mass ratio, the initial separation and the impact parameter (the sideways offset of the approach), and flip the second disk retrograde to see how much the encounter geometry matters. Stars glow cyan or amber by home galaxy on a dark sky, with a trail-fade slider for long-exposure streaks. The clock and the live core separation are reported as tidal tails, bridges and a final merger unfold.

Runs 100% in your browser — simulations are computed locally on your device.

Notes

  • Toomre & Toomre (1972) showed with exactly this restricted three-body trick that tidal tails and bridges are pure gravity: test particles around two point masses reproduce the Antennae galaxies with no gas physics at all.
  • Tides work by differential pull, roughly 2GMr/d³ across a disk of radius r at distance d; a prograde encounter resonates with the stars’ own orbital motion and throws long tails, while a retrograde one barely disturbs the disk.
  • Forces are softened as F ∝ r/(r² + ε²)^{3/2} so close passages stay finite, and the leapfrog integrator is symplectic — it conserves energy on average instead of drifting.
  • Runs 100% in your browser — simulations are computed locally on your device.