Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/azrafe7/uniformpoissondisk

Uniform Poisson Disk Sampling (in Haxe)
https://github.com/azrafe7/uniformpoissondisk

computational-geometry haxe poisson sampling

Last synced: 9 days ago
JSON representation

Uniform Poisson Disk Sampling (in Haxe)

Awesome Lists containing this project

README

        

# UniformPoissonDisk
Uniform Poisson Disk Sampling.

[online js demo](https://rawgit.com/azrafe7/UniformPoissonDisk/master/bin/JsDemo/index.html)


![](snapshot.png)

- supports non-uniform sampling by specifying a per-point distance function
- a reject function can be used to filter out sampled points (while sampling)
- optionally a first point can be specified (instead of choosing one randomly inside the sampling area)

## TODO

- write examples for all the use-cases presented in the devmag article
- optimize methods (split const min distance from parametric distance if feasible)
- improve comments throughout code (upd code especially)

## References

- http://devmag.org.za/2009/05/03/poisson-disk-sampling/ (read this!)
- http://theinstructionlimit.com/fast-uniform-poisson-disk-sampling-in-c (by Renaud Bédard)

The algorithm is from the "Fast Poisson Disk Sampling in Arbitrary Dimensions" paper by Robert Bridson
- http://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf