runifdisc: Sample Points Uniformly on a Disc

Description Usage Arguments Value Author(s) See Also Examples

Description

Sample n points uniformly on a disc of radius r in two-dimensional euclidean space via transformation to polar coordinates: the angle is sampled uniformly from U(0,2π), the length is sampled uniformly from √{U(0,r^2)}. The sampled polar coordinates are then back-transformed to cartesian coordinates.

Usage

1
runifdisc(n, r = 1, buffer = 0)

Arguments

n

integer size of the sample.

r

numeric radius of the disc (centered at (0,0)).

buffer

radius of inner buffer zone without points.

Value

A two-column coordinate matrix of the sampled points.

Author(s)

Sebastian Meyer

See Also

runifdisc in package spatstat, which is slightly more flexible and integrated within the "ppp" class.

Examples

1
2
x <- surveillance:::runifdisc(1000, 3)
plot(x)

jimhester/surveillance documentation built on May 19, 2019, 10:33 a.m.