Skip to content

miladamilli/poisson_disc_sampling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poisson Disc Sampling (in 2 dimensions)

About

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

Poisson vs random

Usage

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

About

Poisson disc sampling algorithm in Elixir

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages