Galactic Irregular Galaxy Simulation

Change the companion mass, offset and speed, then press Reset: a close pass tears the disk into tails and makes it lopsided - an irregular galaxy.
The science

Stars are test particles in a dark-matter halo with a softened isothermal profile: potential Φ(r)=½v0² ln(r²+rc²), so the circular speed is vc=v0r/√(r²+rc²) and stays almost flat. A companion galaxy (Plummer-softened point mass) and the main galaxy orbit each other under Newtonian gravity (G=1); stars feel the halo plus the companion. Integration is leapfrog (kick-drift-kick), which keeps the two-body energy and angular momentum conserved to rounding level.

Irregular galaxies have no clear disk or spiral structure; a close encounter pulls out tidal tails and makes the stellar distribution lopsided. The lopsidedness A1=|Σeiφ|/N (r<6) is 0 for a symmetric disk.

Simplifications: stars do not attract each other or the companion (no self-gravity, no dynamical friction), the halo is rigid and moves with the main galaxy, there is no gas or star formation, units are dimensionless.