Poisson Disk Sampling in Flash
The Dev.Mag article inspired me programming a poisson disk sampler in ActionScript 3. The ActionScript version is based on the Bitmap.hitTest method. This allows the additional feature adding predefined seeding areas.
Another feature is the ability to add a image wich describes the size of the poisson points. The radius of the poissonpoint is defined out of the color of the image. A PerlinNoise image is a good example for a distance map.
This is an example with random sized drips. It has no hitmap and no distance map. If no distance map is added, the radius size will be a random value between radiusMin and radiusMax.
Here is an example with a hitmap and a uniform distance map. All poisson points have the same radius.
I made an editor where you can change the settings and different kind of hitmaps:
Feel free to download and play around with the source.
poissondisksampler.zip
![[del.icio.us]](http://www.bigsource.de/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.bigsource.de/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.bigsource.de/wp-content/plugins/bookmarkify/facebook.png)
![[Google]](http://www.bigsource.de/wp-content/plugins/bookmarkify/google.png)
![[Mixx]](http://www.bigsource.de/wp-content/plugins/bookmarkify/mixx.png)
![[MySpace]](http://www.bigsource.de/wp-content/plugins/bookmarkify/myspace.png)
![[StumbleUpon]](http://www.bigsource.de/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Twitter]](http://www.bigsource.de/wp-content/plugins/bookmarkify/twitter.png)

