Computing Mesh Normals

Point-Cloud-Utils lets you easily compute both vertex and face normals for a mesh

Per-Vertex Normals

import point_cloud_utils as pcu

v, f = pcu.load_mesh_vf("bunny.ply")

# n is a NumPy array with the same shape as v containing vertex normals
n = pcu.estimate_mesh_normals(v, f)

Estimated vertex normals for a triangle mesh

Estimating vertex normals for a triangle mesh.

Per-Face Normals for a Mesh

import point_cloud_utils as pcu

v, f = pcu.load_mesh_vf("bunny.ply")

# n is a NumPy array with the same shape as f containing face normals
n = pcu.estimate_mesh_face_normals(v, f)

Estimated face normals for a triangle mesh

Estimating face normals for a triangle mesh