# tfg.geometry.representation.mesh.normals.face_normals

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/graphics/blob/master/tensorflow_graphics/geometry/representation/mesh/normals.py#L84-L124) |

Computes face normals for meshes.

    tfg.geometry.representation.mesh.normals.face_normals(
        faces: type_alias.TensorLike,
        clockwise: bool = True,
        normalize: bool = True,
        name: str = 'normals_face_normals'
    ) -> type_alias.TensorLike

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.

<br />

<br />

<br />

| ## Note ||
|---|---|
| In the following, A1 to An are optional batch dimensions. ||

<br />

<br />

<br />

<br />

| ## Args ||
|---|---|
| `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". |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor of shape `[A1, ..., An, 3]` containing the face normals. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If the shape of `vertices`, `faces` is not supported. |

<br />