hullSegment: Find segments (lines) of a face.

View source: R/hull.R

hullSegmentR Documentation

Find segments (lines) of a face.

Description

Find segments (lines) of a face.

Usage

hullSegment(
  vertices,
  hull = geometry::convhulln(vertices),
  tol = mean(mean(abs(vertices))) * sqrt(.Machine$double.eps)
)

Arguments

vertices

A ⁠m x p⁠ array of vertices of the convex hull, as used by geometry::convhulln().

hull

Tessellation (or triangulation) generated by geometry::convhulln() If hull is left empty or not supplied, then it will be generated.

tol

Tolerance on the tests for inclusion in the convex hull. You can think of tol as the distance a point may possibly lie outside the hull, and still be perceived as on the surface of the hull. Because of numerical slop nothing can ever be done exactly here. I might guess a semi-intelligent value of tol to be

⁠tol = 1.e-13*mean(abs(vertices(:)))⁠

In higher dimensions, the numerical issues of floating point arithmetic will probably suggest a larger value of tol.

Value

A matrix with segments.

Author(s)

Lars Relund lars@relund.dk


relund/gMOIP documentation built on Feb. 23, 2024, 12:11 p.m.