This greatly simplifies the Point Distribute node. For a poisson disk distribution, it does not use the same algorithm as before, but a simple dart throwing variant.
Advantages over the old code:
- Much less and more readable code.
- Easier to extend with other distribution algorithms.
- More predictable output when when changing the max density and min distance.
- Works in 3d.
The main disadvantage is that it might produce a slightly lower quality poisson disk distribution. However, it was really never a requirement for us for the first release. Our requirements were to have a max density, minimum distance and stability when painting weights. Those are met by the new algorithm.
This is related to T84640.