sampleOnMesh | R Documentation |
Uniformly samples points on a mesh.
sampleOnMesh(n, mesh)
n |
number of simulations, a positive integer |
mesh |
either a list containing (at least) two fields |
The simulated points on a matrix with three columns.
library(MeshesOperations) library(rgl) mesh <- torusMesh(R = 4, r = 2) sims <- sampleOnMesh(200, mesh) open3d(windowRect = c(50, 50, 562, 562)) view3d(0, 0, zoom = 0.75) shade3d(mesh, color = "yellow") points3d(sims, size = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.