Hi,
It would require a quite involcing algorythm if you want to do that mathematically.
If you want to use physics, each node, would have a spring joint set to be very slow and loose, and you would let the colliders do the job. Each node would have a sphere collider. I would play around changing the size of the sphere colliders so that creating a new node has a collider of size 0 and then gradually increase the size so that the physics doesn't "explode".
I would also test this using the new 2d physics, I would tend to hope it would be more performant then using the full 3d physics.
If you find an open source of such distribution algorythm, I will be quite happy to add this to my list of things to port, it's been something I tried to create properly for years...
Bye,
Jean