runif_cube {ashapesampler}R Documentation

r Uniform Cube

Description

Returns points uniformly sampled from cube or rectangular prism in space.

Usage

runif_cube(n, xmin = 0, xmax = 1, ymin = 0, ymax = 1, zmin = 0, zmax = 1)

Arguments

n

number of points to be sampled

xmin

miniumum x coordinate

xmax

maximum x coordinate

ymin

minimum y coordinate

ymax

maximum y coordinate

zmin

minimum z coordinate

zmax

maximum z coordinate

Value

n by 3 matrix of points

Examples

# Sample 100 points from unit cube
runif_cube(100)
# Sample 100 points from unit cube centered on origin
runif_cube(100, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5)

[Package ashapesampler version 1.0.0 Index]