N body newtonian gravity mechanics press green flag for gravity sim. restart it you want to see a different system. eventually the system settles into the scratch heads going into the corners. I haven't been able to get a stable system that doesn't have them be on the walls. Probably because the system would need to have a net velocity of 0, otherwise it must hit the walls eventually.
i might add more stuff, idk. it does get pretty laggy above 3 ish bodies. Feel free to remix and edit code!