TrianglesXYZ: Triangles of a triangulated 3D convex hull

View source: R/cxhull.R

TrianglesXYZR 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")

cxhull documentation built on Oct. 24, 2023, 9:07 a.m.