🔘 Poisson-Disk Sampling: Bridson's Algorithm (2D)
2D companion: watch Bridson's algorithm for Poisson-disk sampling run step by step — active list, background grid, candidate annulus and the minimum-distance rejection test, all animated on a plain canvas.
This 2D companion runs the real, grid-accelerated Bridson algorithm step by step on a plain canvas instead of a decorative dot field: a background grid sized r/√2 drives O(1) neighbor checks, an active list of growable points is drawn from at random each step, up to k candidates are tried in the annulus between r and 2r around the chosen point, and the minimum-distance constraint is enforced exactly — no accepted point ever sits closer than r to another. Watching the active list shrink and the grid cells fill in shows why the algorithm terminates in O(n) time instead of the O(n²) cost of naive rejection sampling.
Grid-accelerated Bridson's algorithm animated step by step: active-list point picking, k candidates per attempt in the [r, 2r] annulus, O(1) neighbor rejection via a r/√2 background grid, live minimum-pair-distance readout.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install