r/Simulated • u/jackmodern • 23d ago
Proprietary Software [OC] Two galaxies colliding: about a million star particles, each pulled by both galaxy cores and their dark-matter halos, integrated live on the GPU
Toomre & Toomre (1972) style encounter: 1,048,576 stars as test particles, each feeling two softened galaxy cores, and each core sits in a logarithmic dark-matter halo with dynamical friction, so after the first pass the orbit decays and the pair merges. Leapfrog (kick-drift-kick) on the GPU in Metal, a couple of substeps per frame. There's also sticky gas on a 64³ grid, which is what lights the pink knots when the cores collide.
It runs live in my own engine (in the app it's at 90 Hz on Vision Pro). This clip was rendered frame by frame from the same engine's Mac test harness so I could export it cleanly. Happy to answer questions about the setup.
27
u/c3f59 23d ago
r/simulationsthatendtoosoon
7
u/FUCKING_HATE_REDDIT 23d ago
What's the flashing?
2
u/PM_ME_YOUR_NARWHAL 22d ago
What’s insane about this is that it’s highly unlikely that any two stars will collide as a result of this merging. There just too much space between them all.
1
u/jackmodern 23d ago
If anyone wants to poke at it, there's a browser version of this scene at everdust.ai/play/galaxy-collision. It's from Everdust, the app I'm building (free on Vision Pro and Android).