pyFM.mesh.geometry.compute_normals

pyFM.mesh.geometry.compute_normals(vertices, faces)

Compute face normals of a triangular mesh.

Parameters:
  • vertices ((n, 3) np.ndarray) – Coordinates of the mesh vertices.

  • faces ((m, 3) np.ndarray) – Vertex indices defining the faces.

Returns:

normals – Array of normalized per-face normals.

Return type:

(m, 3) np.ndarray