dihedralAngles | R Documentation |
Dihedral angles of a convex hull.
dihedralAngles(hull)
hull |
an output of |
A dataframe with three columns. The two first columns represent
the edges, given as a pair of vertex indices. The third column provides
the dihedral angle in degrees corresponding to the edge, that is the
angle between the two faces incident to this edge. This is useful to find
edges between two coplanar faces: if the faces are exactly coplanar then
the dihedral angle is 180, but because of numerical approximation one can
consider that there is coplanarity when the dihedral angle is greater
than 179, for example. This function is used in
plotConvexHull3d
to get rid of such edges (if the user
sets a value to the argument angleThreshold
).
# a cube ####
library(cxhull)
points <- rbind(
c(0.5,0.5,0.5),
c(0,0,0),
c(0,0,1),
c(0,1,0),
c(0,1,1),
c(1,0,0),
c(1,0,1),
c(1,1,0),
c(1,1,1)
)
hull <- cxhull(points)
dihedralAngles(hull)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.