Presets
Playback
Encounter
Disk spin
Drag the picture to pan, use the mouse wheel to zoom.
Model checks
The science
Restricted N-body model
Each galaxy is a single softened point mass (the combined bulge and dark halo) of mass m and thousands of massless test stars. A star at position r accelerates as a = Σ G mj (rj - r) / (|rj - r|2 + ε2)3/2, the Plummer-softened gravity of both centres. The two centres attract each other with the same law, so their relative motion is a softened two-body problem with energy E = ½μv2 - G m1m2/√(r2+ε2) and angular momentum L = μ(r × v), both conserved. E < 0 means a bound orbit that ends in a merger; E > 0 a one-time fly-by.
Disks and spin direction
Stars start on circular orbits in the softened potential of their own centre: vc = √(G m) r / (r2+ε2)3/4. When a disk rotates in the same sense as the orbit (prograde) the tidal force stays resonant with the stars and pulls out long bridges and tails (the Toomre and Toomre 1972 result); a retrograde disk is almost unaffected and keeps compact.
Integrator and units
Kick-drift-kick leapfrog with a fixed step of 0.02 time units: symplectic, second order, with no secular energy drift. Units are the code units of the 3D page (G = 900, m1 = 140, ε = 12). The kpc and Myr labels use an illustrative scale of 1 length unit = 0.1 kpc and 1 time unit = 27 Myr (so a star at 4 kpc orbits at roughly 200 km/s); they are not fitted to a real galaxy pair.
Checks
The measured period of a circular binary is compared with the analytic softened-Kepler period; a single star on a circular orbit is compared with its analytic angular frequency; the default encounter is run through pericentre to confirm that energy and angular momentum of the centre pair stay constant.
Honest simplifications: stars do not attract each other or the centres (no self-gravity, no dynamical friction on the centres, so mergers are slower and less violent than in a full N-body run); no gas, star formation or dark-halo extent; planar 2D motion; the disks are thin and cold. Treat the pictures as a qualitative demonstration of tidal tails, not a model of a real galaxy pair.
What to try
- Run the two spin presets (prograde against retrograde) and compare the length of the tails (readout: Tail reach).
- Set the approach speed to 45: the energy turns positive and the galaxies fly past each other.
- Use a 4:1 mass ratio and watch the small disk being stripped while the big one barely changes.
- Raise the softening length: close encounters become gentler and the closest-approach marker rises.