# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# featureEdges

Triangulation sharp edges

## Syntax

```FE = featureEdges(TR,filterangle) ```

## Description

`FE = featureEdges(TR,filterangle)` returns the feature edges in a 2-D triangulation.

Use this method to extract the sharp edges in the surface mesh for display purposes. A feature edge is an edge that has any of the following attributes:

• The edge is shared by only one triangle.

• The edge is shared by more than two triangles.

• The edge is shared by a pair of triangles with angular deviation greater than the `filterangle`.

## Input Arguments

 `TR` Triangulation representation, see `triangulation` or `delaunayTriangulation`. `filterangle` Filter angle, specified as a scalar value in the range [0,π]. `featureEdges` returns adjacent triangles that have a dihedral angle that deviates from π by an angle greater than `filterangle`.

## Output Arguments

 `FE` Feature edge vertex IDs, returned as a two-column matrix. Each row of `FE` corresponds to a feature edge and contains two IDs: `FE(j,1)` is the ID of the vertex at the start of the edge.`FE(j,2)` is the ID of the vertex at end of the edge.

## Examples

expand all

Use `featureEdges` to find the feature edges of a surface and display them on a plot.

Create a surface triangulation.

```x = [0 0 0 0 0 3 3 3 3 3 3 6 6 6 6 6 9 9 9 9 9 9]'; y = [0 2 4 6 8 0 1 3 5 7 8 0 2 4 6 8 0 1 3 5 7 8]'; DT = delaunayTriangulation(x,y); T = DT(:,:);```

Elevate the 2-D mesh to create a surface.

```z = [0 0 0 0 0 2 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0]'; subplot(1,2,1); trisurf(T,x,y,z,'FaceColor','cyan'); axis equal;```

Compute the feature edges using a filter angle of `pi/6`.

```TR = triangulation(T,x,y,z); fe = featureEdges(TR,pi/6)'; subplot(1,2,2); trisurf(TR,'FaceColor','cyan','EdgeColor',... 'none','FaceAlpha',0.8); axis equal; % Add the feature edges to the plot. hold on; plot3(x(fe), y(fe), z(fe), 'k', 'LineWidth',1.5); hold off;```

expand all