Presets
Playback
Orbit and masses
Changing these restarts the encounter.
Disc spin
Prograde = rotates with the orbit: long tails.
Star colours
Camera follow
Numerics
Live.
Appearance
Layers
Model checks
The science
Planar model
Both galaxies and their orbit lie in one plane. Each has a heavy bulge particle, a live Plummer dark-matter halo of equal-mass particles (ρ ∝ (1 + r²/a²)-5/2) and a disc of massless tracer stars on near-circular orbits with v_c² = G M R²/(R² + a²)3/2. Orbit: r = r_p(1 + e)/(1 + e cosν); the dashed curves are the ideal frictionless Kepler conic, so you can see where friction pulls the real galaxies off it.
Barnes-Hut and integration
Heavy particles go into an octree; a cell of size s at distance d acts as one point mass when s/d < θ. Forces are Plummer softened, a = G m r/(r² + ε²)3/2, stepped with kick-drift-kick leapfrog with an adaptive step dt = 0.3 √(ε/a_max).
Dynamical friction and tidal tails
Chandrasekhar friction decays the orbit: t_df = (1.17/lnΛ) r² v_c/(G M_sat) (Binney and Tremaine 2008, eq. 8.13). It emerges here from the particle halos, not from a formula. Prograde discs (rotating with the orbit) are torn into long tails by resonant tidal forces; retrograde discs are not (Toomre and Toomre 1972).
Live numerical checks
Barnes-Hut accelerations against exact summation, total energy from a direct pair sum, and conservation of angular and linear momentum plus the initial rotation speed against the analytic v_c.
Simplifications
Massless tracer stars (no bars or self-gravitating spirals), no gas or star formation, monopole tree, a few thousand particles: qualitative, not a precise merger-time prediction. The Blender-rendered disc image is a fading visual impostor. Units: kpc, 1010 M☉, km/s; 1 time unit = 977.8 Myr.
What to try
- Pick Prograde 1:1 and watch two tidal tails form after the first passage.
- Pick Retrograde 1:1: tails almost vanish.
- Minor merger 1:4: the small galaxy spirals in; compare its real path with the dashed Kepler orbit.
- Raise theta to 1.4 and watch the Barnes-Hut check degrade.
- Drag to pan, wheel to zoom.