A Possion Disk sample generator for Unity3D
This Unity3D C# script generates poisson disc samples for general purpose.
To use:
- set parameters. ( minDist / k / sampleRange )
- call Generate(). It will return the list contains sample points.
- The PoissonDiskResultHelper.cs can help you set the parameters in Unity editor and visualize the result.
For Poisson Disc and Supersampling, please take a look at:
https://en.wikipedia.org/wiki/Supersampling#Poisson_disc
The algorithm in this script follows:
"Fast Poisson Disk Sampling in Arbitrary Dimensions. Robert Bridson. ACM SIGGRAPH 2007"
- Darting position could be optimized based on grid occupation condition.
- the "List resultList" is some how unnecessary.
- Make the edge of the samples tiled.