hullMesh | R Documentation |
Extract the vertices and the faces from a 3d convex hull.
hullMesh(hull, simplify = TRUE, rgl = FALSE)
hull |
a 3d convex hull, output of |
simplify |
Boolean, whether to return the faces as a matrix instead
of a list if possible, i.e. if all faces have the same number of edges;
this argument is possibly ignored if |
rgl |
Boolean, whether to return a rgl mesh (class
|
A list giving the vertices and the faces, or a rgl mesh.
Unless all faces are triangular, the output does not define a mesh with coherently oriented faces.
library(cxhull)
hull <- cxhull(daVinciSphere)
septuaginta <- hullMesh(hull, rgl = TRUE)
library(rgl)
open3d(windowRect = c(50, 50, 562, 562))
shade3d(septuaginta, color = "darkred")
# some quad faces are misoriented:
open3d(windowRect = c(50, 50, 562, 562))
shade3d(septuaginta, color = "tomato", back = "culled")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.