setAlpha: Set alpha value to a full alpha hull and computes this alpha...

View source: R/FullAS.R

setAlphaR Documentation

Set alpha value to a full alpha hull and computes this alpha hull

Description

Given a full alpha hull, this function allows to set the value of alpha, either an arbitrary positive number, or an optimal value for a desired number of connected components, or a value for which the alpha hull is solid.

Usage

setAlpha(ahull, alpha = "solid")

Arguments

ahull

a full alpha hull, i.e. an output of fullAhull3d

alpha

there are three possibilities for this parameter: it can be a positive number, or the character string "solid" to get and set the smallest alpha for which the alpha hull is solid, or a positive integer obtained with the optimal function to get and set the optimal alpha for which the alpha hull has no more than a desired number of connected components

Value

A rgl mesh (class mesh3d) with the value of alpha in the "alpha" attribute.

See Also

fullAhull3d, optimal.

Examples

library(AlphaHull3D)
ahull <- fullAhull3d(gissid)
mesh <- setAlpha(ahull, alpha = optimal(1))
mesh$normals <- NULL
library(rgl)
open3d(windowRect = c(50, 50, 562, 562))
shade3d(mesh, color = "maroon")

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