Generate randomly oriented vectors in 2D, following an isotropic distribution (optionally truncated to a region).
Usage
runif2(n = 1, r = c(0, 1), azimuth = c(0, 2 * pi), quasi = FALSE, start = 1)
Value
Returns an n-by-2 array of n vectors.
Arguments
n
number of random vectors to be generated
r
2-vector specifying the range of radii
azimuth
2-vector specifying the range of azimuth angles
quasi
logical flag. If true, quasi-random numbers with low-discrepancy are drawn, based on a Halton sequence. Otherwise, the standard internal pseudo-random generator of runif() is used.
start
starting index of Halton sequence. Only used if quasi=TRUE.