Description Usage Arguments Details Value Examples
Spreads points evenly across a disk of any radius using the golden angle. Defaults to sampling 250 points on the unit disk.
1 | sample_disk(x = 0, y = 0, r = 1, n = 250)
|
x |
X coordinate for the center of the disk. |
y |
Y coordinate for the center of the disk. |
r |
Radius. |
n |
Number of points to generate. |
The function is vectorized.
A matrix of x
and y
coordinates.
1 2 3 | pp <- sample_disk(x = 10, y = -5, r = 5, n = 800)
head(pp)
plot(pp, asp = 1, pch = 19)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.