Title: | Poisson Disk Sampling in 2D and 3D |
---|---|
Description: | Poisson disk sampling is a method of generating blue noise sample patterns where all samples are at least a specified distance apart. Poisson samples may be generated in two or three dimensions with this package. The algorithm used is an implementation of Bridson (2007) "Fast Poisson disk sampling in arbitrary dimensions" <doi:10.1145/1278780.1278807>. |
Authors: | Mike Cheng [aut, cre, cph] |
Maintainer: | Mike Cheng <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.3.9000 |
Built: | 2024-11-07 12:23:35 UTC |
Source: | https://github.com/coolbutuseless/poissoned |
Generate Poisson disk samples in 2D
poisson2d(w = 10, h = 10, r = 2, k = 30L, verbosity = 0L)
poisson2d(w = 10, h = 10, r = 2, k = 30L, verbosity = 0L)
w , h
|
width and height of region |
r |
minimum distance between points |
k |
number of sample points to generate at each iteration. default 30 |
verbosity |
Verbosity level. default: 0 |
data.frame with x and y coordinates. Points are returned in the order in which they were generated.
pts <- poisson2d(w = 40, h = 40, r = 1) plot(pts, asp = 1, ann = FALSE, axes = FALSE, pch = 19)
pts <- poisson2d(w = 40, h = 40, r = 1) plot(pts, asp = 1, ann = FALSE, axes = FALSE, pch = 19)
Generate Poisson disk samples in 3D
poisson3d(w = 10, h = 10, d = 10, r = 4, k = 30L, verbosity = 0L)
poisson3d(w = 10, h = 10, d = 10, r = 4, k = 30L, verbosity = 0L)
w , h , d
|
width and height and depth of region |
r |
minimum distance between points |
k |
number of sample points to generate at each iteration. default 30 |
verbosity |
Verbosity level. default: 0 |
data.frame with x, y and z coordinates. Points are returned in the order in which they were generated.
poisson3d(w = 10, h = 10, d = 10, r = 5)
poisson3d(w = 10, h = 10, d = 10, r = 5)