ahull3d: 3D alpha hull for a given alpha

View source: R/FixedAS.R

ahull3dR Documentation

3D alpha hull for a given alpha

Description

Computes the alpha hull of a set of points for a given alpha.

Usage

ahull3d(points, alpha, volume = FALSE)

Arguments

points

the points given as a matrix with three columns

alpha

positive number

volume

Boolean, whether to return the volume of the alpha hull, but this is not always reliable

Value

A mesh3d object, with an attribute "volume" if volume = TRUE.

Note

If you want to compute the alpha hull for several values of alpha, then instead of using this function you can use the fullAhull3d and the setAlpha functions.

Examples

library(AlphaHull3D)
library(uniformly)
library(rgl)

set.seed(666L)
pts <- runif_in_torus(5000L, R = 3, r = 1)
ahull <- ahull3d(pts, alpha = 2)

open3d(windowRect = c(50, 50, 562, 562))
points3d(pts)
shade3d(ahull, color = "orange", alpha = 0.4)

AlphaHull3D documentation built on Nov. 25, 2022, 9:09 a.m.