Poisson disk sampling
Watch Bridson’s algorithm scatter points like seeds — never too close, never in rows. Compare blue noise to white noise, adjust the minimum distance, and see why game engines and artists prefer this elegant randomness.
Bridson’s algorithm: O(n) cell size = r / √2 k = 30 candidates per point
Bridson’s algorithm
The algorithm maintains an active list of points that might still have room for neighbors. For each active point, it generates up to k candidate samples in the annulus between r and 2r distance away. If a candidate is far enough from all existing points (checked efficiently using a background grid), it becomes a new point and joins the active list. When a point exhausts all k candidates without success, it’s removed from the active list. The algorithm terminates when the active list is empty.
Blue noise
The resulting distribution is called blue noise because its frequency spectrum has no low-frequency content — there are no large clumps or voids. In contrast, white noise (uniform random) has clumps and gaps, and grid-based sampling shows visible regularity. Blue noise is optimal for many applications: stippling, dithering, object placement in games, and anti-aliasing.
The background grid
The spatial acceleration structure divides the domain into cells of size r/√2. Each cell can contain at most one sample point. To check whether a new candidate is valid, we only need to examine the surrounding 5×5 grid neighborhood — constant time per check, making the whole algorithm O(n).
Stippling
Weighted Poisson disk sampling adjusts the minimum distance based on a density function. In stipple mode, darker regions get smaller minimum distances, producing denser point clusters — the same technique used in computational stipple art to reproduce grayscale images with dots alone.
← Back to all experiments