I made this simulation a few years ago in my StarryOrbits gravity laboratory app. It uses a simplified model of the galaxies with the core stars in red or blue and the halo stars in yellow or green. Newton's laws of motion are then used to predict what will happen in the future. The simulation repeats a few times so you can watch it properly. What is interesting is that the 2 galaxy cores stay mostly intact even after they have passed thru each other a few times. It is actually better to watch it in StarryOrbits because it has a 3D viewer that lets you rotate, pan and zoom while the animation is playing. Great to have a couple of galaxies on your PC to play with.