MESHVERTEXNORMALS Compute normals to a mesh vertices. N = meshVertexNormals(V, F) Computes vertex normals of the mesh given by vertices V and F. V is a vertex array with 3 columns, F is either a NF-by-3 or NF-by-4 index array, or a cell array with NF elements. Example % Draw the vertex normals of a sphere s = [10 20 30 20]; [v f] = sphereMesh(s); figure; drawMesh(v, f); view(3);axis equal; light; lighting gouraud; normals = meshVertexNormals(v, f); drawVector3d(v, normals*2); See also meshes3d, meshFaceNormals, triangulateFaces
Package: matgeom