View source on GitHub

Computes face normals for meshes.

This function supports planar convex polygon faces. Note that for non-triangular faces, this function uses the first 3 vertices of each face to calculate the face normal.


In the following, A1 to An are optional batch dimensions.

faces A tensor of shape [A1, ..., An, M, 3], which stores vertices positions of each face, where M is the number of vertices of each face. The rank of this tensor should be at least 2.
clockwise Winding order to determine front-facing faces. The order of vertices should be either clockwise or counterclockwise.
normalize A bool defining whether output normals are normalized.
name A name for this op. Defaults to "normals_face_normals".

A tensor of shape [A1, ..., An, 3] containing the face normals.

ValueError If the shape of vertices, faces is not supported.