ahull3d | R Documentation |
Computes the alpha hull of a set of points for a given alpha.
ahull3d(points, alpha, volume = FALSE)
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 |
A mesh3d
object, with an attribute "volume"
if
volume = TRUE
.
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.