powered by
Returns points uniformly centered from closed ball of radius r in 3D space
runif_ball_3D(n, r = 1)
n by 3 matrix of points
number of points
radius of ball, default r=1
# Sample 100 points from unit ball runif_ball_3D(100) # Sample 100 points from ball of radius 0.5 runif_ball_3D(100, r=0.5)
Run the code above in your browser using DataLab