TrianglesXYZ {cxhull}R Documentation

Triangles of a triangulated 3D convex hull

Description

Coordinates of the vertices of the triangles of a triangulated 3D convex hull.

Usage

TrianglesXYZ(hull)

Arguments

hull

an output of cxhull applied to 3D points and with the option triangulate=TRUE

Value

A matrix with three columns. Each row represents the coordinates of a vertex of a triangle.

Examples

library(cxhull)
library(rgl)
dodecahedron <- t(dodecahedron3d()$vb[-4L, ])
hull <- cxhull(dodecahedron, triangulate = TRUE)
triangles <- TrianglesXYZ(hull)
triangles3d(triangles, color = "firebrick")

[Package cxhull version 0.7.4 Index]