Interactive demo
Blue Noise
Purely random points form clumps and leave gaps. Blue noise points are still random, but keep a minimum distance from each other, like trees in a forest or cells in the retina. Robert Bridson's algorithm creates them in linear time.
Every step picks an active point (coral) and tries up to k random positions in the ring around it. Green is accepted, crosses were too close to another point.
Controls
Display
- Points
- –
- Active points
- –
Legend
- Point
- Active point (may still get neighbors)
- Current point and rejected tries
- Accepted new point
Noise types compared
| Noise | Output | Built from | Work per sample | Smooth |
|---|---|---|---|---|
| Value Noise | Scalar field | Random values on a grid | 4 grid points | Yes |
| Perlin Noise | Scalar field | Random gradients on a grid | 4 grid points | Yes |
| Simplex Noise | Scalar field | Gradients on a triangle grid | 3 corners | Yes |
| Worley Noise | Scalar field | Random feature points | 9 to 25 cells | No |
| Blue Noise this page | Point set | Random candidates around existing points | Up to 30 tries per point | – |
| Fractal Noise | Scalar field | Octaves of a base noise | 1 base noise per octave | Yes |
| Diamond-Square | Heightmap | Displaced midpoints of a grid | 4 neighbors per point | No |
| Colors of Noise | Signal or image | White noise filtered by frequency | 1 FFT for all samples | – |
| Domain Warping | Scalar field | Fractal noise at warped positions | Up to 5 fractal noises | Yes |
| Curl Noise | Vector field | Derivatives of a noise field | 4 noise samples | Yes |
| Noise Terrain Generator | Heightmap | Stacked noise layers | Layers × octaves | – |
1. Tries around active points
- Start with one random point and mark it active.
- Pick a random active point and try up to k random positions in the ring between r and 2r around it.
- Keep the first position that is at least r away from every point, and mark it active.
- If all k tries fail, retire the point. Stop when no active point is left.
2. A grid for the neighbors
To test a position quickly, a background grid with cells of size r/√2 is used. Each cell holds at most one point, so only the 5 × 5 cells around a position need to be checked, no matter how many points there are.
3. Why “blue”
The spectrum of random points is flat, like white noise. Poisson disk points have almost no power at low frequencies, the dark disk in the middle of their spectrum, because they never clump. That is the mark of blue noise, and why it is used for sampling, dithering and stippling.
Credits
- The algorithm is Fast Poisson Disk Sampling in Arbitrary Dimensions by Robert Bridson (SIGGRAPH 2007).