sample_uniform: Sample Uniformily from various objects centered at the origin

Description Usage Arguments Value Examples

Description

Sample Uniformily from various objects centered at the origin

Usage

1
2
3
rUnifSphere(n, D, radius = 1, shell_only = FALSE)

rUnifSimplex(n, D)

Arguments

n

number of samples to produce

D

dimension of object

radius

radius of sphere to sample from

shell_only

if TRUE samples from shell of object only, if false samples from entire region of object

Value

matrix of dimension D x n

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Sample Uniformily from Sphere (Full)
x <- rUnifSphere(1000, 2, 2)
plot(t(x), asp=1)

# Sample Uniformily from Sphere (Shell Only)
x <- rUnifSphere(1000, 2, 2, shell_only=TRUE)
plot(t(x), asp=1)

# Sample Uniformily from Simplex
x <- rUnifSimplex(1000, 2)
plot(t(x), asp=1)

jsilve24/driver documentation built on Jan. 30, 2022, 12:07 p.m.