Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



7 Commits

Repository files navigation

Poisson Disc Sampling (in 2 dimensions)


Poisson disc distribution produces evenly randomly distributed points, where all points are at least minimum distance apart.

Poisson vs random


PoissonDiscSampling.generate(min_dist, area_width, area_height, samples)

min_dist - minimum distance between points

samples - maximum number of attempts to find a new suitable point in each step (typically 30)

The algorithm divides the area into a grid and places at most one point into each cell.

Returns list of {x, y} points.

Sample app

Poisson & Colors

Further Reading