Description Usage Arguments Details See Also Examples
View source: R/plot.ashape3d.R
This function plots the αshape in 3D using the package
rgl
.
1 2 3 4 
x 
An object of class 
clear 
Logical, specifying whether the current rgl device should be cleared. 
col 
A vector of length three specifying the colors of the triangles, edges and vertices composing the αshape, respectively. 
byComponents 
Logical, if TRUE the connected components of the
αshape are represented in different colors, see

indexAlpha 
A single value or vector with the indexes of

transparency 
The coefficient of transparency, from 0 (transparent) to 1 (opaque), used to plot the αshape. 
walpha 
Logical, if TRUE the value of α is displayed in the rgl device. 
triangles 
Logical, if TRUE triangles are plotted. 
edges 
Logical, if TRUE edges are plotted. 
vertices 
Logical, if TRUE vertices are plotted. 
... 
Material properties. See 
The function plot.ashape3d
opens a rgl device for each value of
α in x$alpha[indexAlpha]
. Device information is displayed
in the console.
If indexAlpha="all"
or indexAlpha="ALL"
then the function
represents the αshape for all values of α in
as3d$alpha
.
1 2 3 4 5 6 7 8 9 10 11  T1 < rtorus(1000, 0.5, 2)
T2 < rtorus(1000, 0.5, 2, ct = c(2, 0, 0), rotx = pi/2)
x < rbind(T1, T2)
alpha < c(0.15, 0.25, 1)
ashape3d.obj < ashape3d(x, alpha = alpha)
# Plot the alphashape for all values of alpha
plot(ashape3d.obj, indexAlpha = "all")
# Plot the connected components of the alphashape for alpha=0.25
plot(ashape3d.obj, byComponents = TRUE, indexAlpha = 2)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.