Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
type Point struct {
X, Y float64
}
func Sample ¶
Sample produces points via Poisson-disc sampling. The points will all be within the box defined by `x0`, `y0`, `x1`, `y1`. No two points will be closer than the defined radius `r`. For each point, the algorithm will make `k` attempts to place a neighboring point. Increase this value for a better sampling or decrease it to reduce algorithm runtime. You may provide your own `*rand.Rand` instance or `nil` to have one created for you. Learn more about Poisson-disc sampling from the links below: https://www.jasondavies.com/poisson-disc/ https://bl.ocks.org/mbostock/dbb02448b0f93e4c82c3
Click to show internal directories.
Click to hide internal directories.