faceNormals
Legacy form of faceNormal for TriRep and DelaunayTri objects.
Category: Mathematics > Computational Geometry
Syntax
N = faceNormals(TR)
Unit normals of all triangles.
N = faceNormals(TR, T)
Only for the triangles in T.
Description
faceNormals is the older name of faceNormal and returns the same vectors: perpendicular to each triangle and oriented by the right-hand rule on the vertex order. In a 2-D triangulation every normal is [0 0 1], assuming counterclockwise vertex order.
Input arguments
TR- A
TriReporDelaunayTriobject. T- Optional triangle indices.
Output arguments
N- One unit normal per row.
Example
Normals of a planar mesh
x = [0 1 1 0 0.5]';
y = [0 0 1 1 0.5]';
DL = DelaunayTri(x, y);
N = faceNormals(DL)
Output
N = 4×3
0 0 1
0 0 1
0 0 1
0 0 1