powered by
Returns points uniformly sampled from annulus in plane
runif_annulus(n, rmax = 1, rmin = 0.5)
n by 2 matrix of points sampled
number of points to sample
radius of outer circle of annulus
radius of inner circle of annulus
# Sample 100 points from annulus with rmax=1 and rmin=0.5 runif_annulus(100) # Sample 100 points from annulus with rmax=0.75 and rmin=0.25 runif_annulus(100, 0.75, 0.25)
Run the code above in your browser using DataLab