sample_disk: Spread points across a disk using Vogel's method

Description Usage Arguments Details Value Examples

Description

Spreads points evenly across a disk of any radius using the golden angle. Defaults to sampling 250 points on the unit disk.

Usage

1
sample_disk(x = 0, y = 0, r = 1, n = 250)

Arguments

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.

Details

The function is vectorized.

Value

A matrix of x and y coordinates.

Examples

1
2
3
pp <- sample_disk(x = 10, y = -5, r = 5, n = 800)
head(pp)
plot(pp, asp = 1, pch = 19)

jolars/motley documentation built on May 19, 2019, 7:25 p.m.