Home▸Space & Astronomy▸Galaxy Collision 2D: Top-Down N-Body Merger

Galaxy Collision 2D: Top-Down N-Body Merger

A 2D top-down N-body reimplementation of two galaxies on a collision course: tune the mass ratio and approach speed, watch mutual gravity drag out tidal tails, and read live core separation, relative velocity and elapsed time.

Space & Astronomy2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-3d-galaxy-collision ↗ Open standalone

This 2D top-down companion to the 3D galaxy-collision simulator reimplements the same mechanic as a restricted N-body model: two galaxy cores orbit and fall toward each other under real mutual Newtonian gravity, while thousands of star particles in each disk feel the pull of both cores without pulling back, stretching into the tidal bridges and tails astronomers see in real merging galaxies. Adjust the mass ratio between the two galaxies, their approach speed, and the impact angle, then watch the live readouts track core separation, relative velocity and elapsed time as the encounter unfolds toward a merger or a fly-by.

⚙ Under the hood

A 2D top-down N-body reimplementation of two galaxies on a collision course: tune the mass ratio and approach speed, watch mutual gravity drag out tidal tails, and read live core separation, relative velocity and elapsed time.

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)