🔘 Poisson-Disk Sampling
Interactive Bridson Poisson-disk sampler producing blue-noise point distributions. Compare to uniform random and regular grids, paint density maps.
About this simulation
This simulation implements Bridson's algorithm for Poisson-disk sampling: a fast, grid-accelerated way to scatter points so that no two lie closer than a chosen minimum radius r, without the clumps and gaps of pure random placement. Each new point is grown from an active parent by trying up to k candidates in the annulus [r, 2r] around it, and a background grid with cell size r/√2 lets the neighbour-distance check run in O(1) time, so the whole algorithm scales as O(n). The resulting point set has the statistical signature of blue noise — low-frequency clumping is suppressed, visible in the live radial power spectrum.
🔬 What it shows
Three point-generation strategies side by side: Bridson blue noise, uniform random placement, and a regular grid. Purple dots mark points still on the active list (candidates can still spawn from them); white dots are "dead" points whose neighbourhood is full. A faint ring flashes red or purple around each rejected or accepted candidate as the algorithm runs.
🎮 How to use
Switch modes with the radio buttons, then tune Minimum radius r (6–40px) and Attempts k (5–60) — higher k finds tighter packings at the cost of more rejected candidates. Animation speed controls points generated per frame. Enable Variable radius (density) and Paint density map to drag directly on the canvas and sculpt regions of denser or sparser sampling; toggle Show background grid and Radial spectrum inset to see the acceleration structure and the blue-noise signature.
💡 Did you know?
Poisson-disk (blue noise) point sets are prized in computer graphics precisely because human vision is very sensitive to low-frequency clustering — it's why blue noise is used for dithering images, placing trees or grass in game terrain, sampling pixels in ray tracers, and even arranging photoreceptor cells in the retina, which biologists found follow a near-Poisson-disk pattern.
Frequently asked questions
What is Poisson-disk sampling?
Poisson-disk sampling generates a set of random points in space such that every pair of points is separated by at least a minimum distance r, while still looking irregular and organic rather than grid-like. It sits between fully random scattering (which clumps) and a regular grid (which looks artificial), and is the standard way to produce "blue noise" point distributions.
How does Bridson's algorithm work step by step?
Start with one random seed point and add it to an "active list". Repeatedly pick a random point from the active list and try up to k random candidates in the annulus between r and 2r around it. The first candidate that is at least r away from every existing point is accepted and added to both the point set and the active list; if none of the k tries succeed, the parent point is removed from the active list. The process ends when the active list is empty.
Why does the algorithm use a background grid?
Checking a new candidate against every existing point would take O(n) time per candidate, making the whole algorithm O(n²). Bridson's key trick is a background grid with cell size r/√2, chosen so each cell can hold at most one accepted point. A candidate only needs to check its own cell and the surrounding neighbourhood (a small fixed number of cells), so each check runs in O(1), and the entire algorithm runs in O(n) time for n output points.
What is "blue noise" and why does it matter?
Blue noise describes a point distribution whose power spectrum has little energy at low spatial frequencies — meaning there are no large clusters or large empty gaps, only fine-scale, evenly distributed variation. This property is visually important because the human eye is highly sensitive to low-frequency patterns like clumps or moiré artefacts. That is why blue noise sampling is the standard technique for stippling, dithering, anti-aliasing, and procedurally scattering objects such as trees, rocks or grass in a natural-looking way.
How does variable-radius sampling create density gradients?
Instead of using one fixed radius r everywhere, the local minimum distance can be looked up from a density map: a small radius is used in dense regions (allowing points to sit closer together) and a larger radius in sparse regions (spreading points further apart). The neighbour check then uses the larger of the candidate's and each existing point's radius, so the packing stays consistent everywhere. This produces smoothly varying point density while keeping the same no-overlap guarantee everywhere, which is exactly what the Paint density map tool lets you sculpt by hand.
Bridson's blue-noise sampler in action: an active list grows by accepting candidates at distance r to 2r — and refusing anything closer than r. Compare to uniform random and watch the radial spectrum.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install