---
title: "Galaxy Collisions and Tidal Tails Interactive Lab | Sandbox Physics"
description: "How can two galaxies come together when their stars rarely collide? Gravity shifts energy from the mutual orbit into motion inside the galaxies."
canonical_url: "https://sandboxphysics.com/labs/galaxy-encounters/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/galaxy-encounters/"
last_modified: "2026-11-22"
---

# Galaxy Collisions and Tidal Tails

**How can two galaxies come together when their stars rarely collide?** Gravity shifts energy from the mutual orbit into motion inside the galaxies. A close pass can fling outer stars into tails and leave the centers with a tighter orbit. That transfer can happen even if no stars touch.

Watch gravity draw two tracer disks into tails. Drag a center to change the approach, then compare the full model orbit with a saved simulation of two self-gravitating haloes.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

This Lab depicts synthetic encounters of two identical galaxy haloes. Colored dots are massless disk tracers in an orbital-plane projection. In the saved direct simulation gravity includes all 2,560 massive halo elements with pair softening. The marked centers are the means of fixed groups of initially most-bound particles. In the live model the haloes keep fixed profiles and the centers can lose orbital energy to a prescribed drag. Gas, star formation, black-hole hardening, and projection onto a real telescope image are outside this calculation.

Recorded N-body simulation · viewed along the orbit axis

Distance between the two centers

Distance (kpc) against time (Gyr)

> Center separation measured across the simulated passage.

- Recorded N-body
- Rigid haloes with drag
- Rigid haloes without drag

[Compare the full trajectories and download native particle states](https://sandboxphysics.com/stories/galaxy-encounters/compare-encounter-trajectories/)

## From a close pass to a tighter orbit

**Background** The near side of a disk gets pulled harder than its center, and the far side gets pulled less. After the encounter, particles with different velocities spread out into bridges and tails.

**Why it matters** A rigid spherical halo lets you follow the orbit quickly. A live halo also deforms, so it can exchange energy and angular momentum with that orbit.

- **Focus question**: When does a drag term improve the predicted separation of the centers?
- **One-sentence intuition**: Compare the full curves at the same time. Tails can grow even in a flyby. Orbital decay has to be checked separately.

### Core mathematical model

#### Relative tidal acceleration

$$
\Delta\boldsymbol{a}=\boldsymbol{g}(\boldsymbol{R}+\boldsymbol{r})-\boldsymbol{g}(\boldsymbol{R})
$$

Subtract the pull at the disk center from the pull at a tracer star.

### Common difficulties

#### A long tail and an escaping pair

**Typical misconception** A long tail always signals a completed merger.

**Better mental model** A fast passage can pull stars into a tail as the centers move apart again.

### Run the experiment

1. 01

   #### Change one disk’s spin

   Compare Two long tails with One disk spins backward at the same time.

   **What to observe:** The live halo orbit stays the same because the disk tracers carry no mass. The tracer pattern changes.

2. 02

   #### Compare the paths

   Select the fast flyby. Scrub past the closest approach and compare separation with and without drag.

   **What to observe:** The spacing between the curves depends on how long the haloes spend near each other.

Physical conclusion

A close pass redistributes energy. The shape of the tails and the motion of the cores reveal different parts of that exchange.

## Related experiments and articles

Galaxies in close encounters · Reading path

### Galaxies in close encounters

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Why galaxies merge even though their stars rarely meet**](https://sandboxphysics.com/stories/galaxy-encounters/why-galaxies-merge/)
2. [Article **Tidal acceleration across a galaxy disk**](https://sandboxphysics.com/stories/galaxy-encounters/tidal-acceleration/)
3. [Article **How a galaxy orbit loses energy**](https://sandboxphysics.com/stories/galaxy-encounters/orbital-energy/)
4. [Article **Compare a drag orbit with a direct galaxy simulation**](https://sandboxphysics.com/stories/galaxy-encounters/compare-encounter-trajectories/)
5. [Article **Read how black-hole binaries shrink in a galaxy merger**](https://sandboxphysics.com/stories/galaxy-encounters/read-black-hole-hardening/)

Motion & dynamics · Starter path

## From a falling ball to an orbit

Start by measuring gravity and splitting motion into components. Then add contact forces and collisions, and follow the same laws all the way to an orbit.

[Start here → **Free Fall & Measuring Gravity** Capture a few drops and fit the camera positions to estimate gravitational acceleration. Then add air damping and watch the fit drift from the truth. Observe · 14 min](https://sandboxphysics.com/labs/free-fall/)

1. [1 Free Fall & Measuring Gravity](https://sandboxphysics.com/labs/free-fall/)
2. [2 Projectile Flight Designer](https://sandboxphysics.com/labs/projectile-flight/)
3. [3 Inclined Plane & Friction](https://sandboxphysics.com/labs/inclined-plane/)
4. [4 One-Dimensional Collision Bench](https://sandboxphysics.com/labs/collision-bench/)
5. [5 Mass–Spring Oscillator](https://sandboxphysics.com/labs/mass-spring/)
6. [6 How Orbits Take Shape](https://sandboxphysics.com/labs/orbit/)

[View the full path →](https://sandboxphysics.com/topics/mechanics/#starter-path)
