Poisson Disk Sampling

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The Poisson disk method is a well-known algorithm for obtaining a random but uniform sampling of points in a given area. While purely random sampling is uneven and a periodic mesh is too artificial, the Poisson disk algorithm produces a more natural uniform distribution.

Contributed by: Sunik Dennis (October 12)
Open content licensed under CC BY-NC-SA


This optimized version of the algorithm is from Robert Bridson, University of British Columbia [1].

It takes parameter , the minimum distance between samples, and parameter , the number of tries to accept or reject a sample.

For storing samples and accelerating spatial searches, the method uses two additional arrays: grid and active.

Use the drop-down menu to select the shape.

Select the checkboxes to "show disks" and "show active" array.

The algorithm is not without drawbacks. It is interesting to observe when sometimes sampling of a two-part area goes wrong.


[1] R. Bridson. "Fast Poisson Disk Sampling in Arbitrary Dimensions." (Sep 1, 2023) www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf.


Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.