TrianglesXYZ {cxhull} | R Documentation |
Coordinates of the vertices of the triangles of a triangulated 3D convex hull.
TrianglesXYZ(hull)
hull |
an output of |
A matrix with three columns. Each row represents the coordinates of a vertex of a triangle.
library(cxhull)
library(rgl)
dodecahedron <- t(dodecahedron3d()$vb[-4L, ])
hull <- cxhull(dodecahedron, triangulate = TRUE)
triangles <- TrianglesXYZ(hull)
triangles3d(triangles, color = "firebrick")