Skip to content

pmchung/poisson-disc-sampler

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

poisson-disc-sampler

This code is based on Mike Bostock's implementation of Jason Davies' implementation of Bridson's algorithm.

// width, height, radius
var sampler = poissonDiscSampler(1000, 500, 10);

var sample;

while ((sample = sampler())) {
  console.log('x, y:', sample[0], sample[1]);
}

console.log('no space left for other points now, all done');

About

๐ŸŒ€ a simple Bridson's algorithm implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%