runif_square | R Documentation |
Returns points uniformly sampled from square or rectangle in plane.
runif_square(n, xmin = 0, xmax = 1, ymin = 0, ymax = 1)
n |
number of points |
xmin |
minimum x coordinate |
xmax |
maximum x coordinate |
ymin |
minimum y coordinate |
ymax |
maximum y coordinate |
n by 2 matrix of points
# Sample 100 points from unit square
runif_square(100)
# Sample 100 points from unit square centered at origin
runif_square(100, 0.5, 0.5, 0.5, 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.