Hacker News new | ask | show | jobs
by chkas 518 days ago
It shouldn't be that complicated. I tried it once with gravity and without limits on the edges. The cluster of stars moved around in 2d space and stars were repeatedly catapulted out, which then disappeared. Maybe you need a super gravity (black hole) in the center to keep it stable.
1 comments

From my experiments, you need to flip the velocity if it goes out of bounds, and have a little bit of drag, multiply each vel by 0.9999 each frame.

Otherwise, a few particles being ejected at very high speeds IS realistic... they carry away surplus kinetic energy, which allows the remaining cluster to contract.

And once too much matter has lost too much kinetic energy, it does converge and become a black hole.

The weird thing is that their radius scales proportional with their mass, not volume... so they grow in this weird way where adding a 3 solar mass black to a 3e6 solar mass SMBH causes the SMBH's volume to grow by several, several times the volume taken by the 3e0 BH. It's like black holes force themselves to grow in a straight line internally, but then the entire sphere encompassing that line becomes event horizon, which is probably why there only seems to end up being 1 SMBH per galaxy, they get so big so quickly at the 1e6+ range, that any other BHs drifting around the vicinity get absorbed by the growing EH, which causes the EH to grow more, causing it to absorb more BH... so there's this period where a bunch of relatively tiny, sparse black holes suddenly hit the critical density where the entire region they were all sharing suddenly pops into one huge event horizon that encompasses all the empty space they were sharing previously.

Did some experimenting with gravity, not sure how far the physics is correct, but looks okay

https://tiki.li/run/#cod=dVLbbuIwEH33Vxyp0gqKGhIktKVqeO1HIB5...

The physics in the simulation was faulty, that should be better now. Of course there are less collisions in 3D than in 2D. And this catapulting of stars is also an artifact in the discrete computer simulation

https://tiki.li/run/#cod=fVPRbuMgEHznK0aqdGodxSW5S0+uSl/zEVF...