sims <- runif_on_cube(60, d = 2)
plot(sims, xlim = c(-1,1), ylim = c(-1,1), pch = 19, asp = 1)
sims <- runif_in_cube(50, d = 3)
library(scatterplot3d)
scatterplot3d(sims, pch = 19, highlight.3d = TRUE, asp = 1)
Run the code above in your browser using DataLab