tetramesh | R Documentation |
tetramesh(T, X, col)
uses the rgl package to
display the tetrahedrons defined in the m-by-4 matrix T as mesh.
Each row of T
specifies a tetrahedron by giving the 4
indices of its points in X
.
tetramesh(T, X, col = grDevices::heat.colors(nrow(T)), clear = TRUE, ...)
T |
T is a |
X |
X is an n-by-2/n-by-3 matrix. The rows of X represent |
col |
The tetrahedron colour. See rgl documentation for details. |
clear |
Should the current rendering device be cleared? |
... |
Parameters to the rendering device. See the rgl package. |
Raoul Grasman
trimesh
, rgl
, delaunayn
,
convhulln
, surf.tri
## Not run:
# example delaunayn
d = c(-1,1)
pc = as.matrix(rbind(expand.grid(d,d,d),0))
tc = delaunayn(pc)
# example tetramesh
clr = rep(1,3) %o% (1:nrow(tc)+1)
rgl::view3d(60,fov=20)
rgl::light3d(270,60)
tetramesh(tc,pc,alpha=0.7,col=clr)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.