featureEdges
Sharp edges of a triangulated surface, selected by the angle between adjacent faces.
Category: Mathematics > Computational Geometry
Syntax
E = featureEdges(TR, angle)
Returns the edges where the angle between the two adjacent faces exceeds angle.
Description
For each edge shared by two triangles, the function measures the angle between the two face normals. An edge is kept when that angle is larger than the threshold. On a cube, the 12 edges at the corners are kept while the diagonals across the flat faces are dropped, since those faces are coplanar.
The result is typically drawn on top of a shaded surface to emphasise its creases.
Input arguments
TR- A
triangulationof a 3-D surface (triangles). angle- Threshold angle in radians, between 0 and
pi.
Output arguments
E- Two-column matrix of vertex indices, one row per feature edge.
Example
Creases of a tetrahedron
P = [0 0 0; 1 0 0; 0 1 0; 0 0 1];
T = [1 3 2; 1 2 4; 1 4 3; 2 3 4];
tr = triangulation(T, P);
E = featureEdges(tr, pi/6)
Output
E = 6×2
1 2
1 3
1 4
2 3
2 4
3 4