Nice. Have you tried a version where the particles have a small atraction/repulsion? (Bonus points for a bar to choose the force.) (1/r^2? can I choose the exponent?)
I was expecting a +/- charge interaction like this as well, but that was just based on my brain's default interpretation of the word particle in the title with this being HN and all. It took a second for my brain to switch to just a visual fx particle system use of the word.
Nonetheless, my default thoughts do not take away from it being a fun visual to zone out to for a bit
it doesn't have to be 3d though. another idea would be to assign mass values to the particles and see if after an amount of time if everything settles down to some sort of orbital track around each other. but either idea moves it from being a relaxing visual into a bit of sciencey simulator that totally changes to the scope of the project
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.
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.