View source: R/write_fs_surface.R
| mesh.face.normals | R Documentation |
The normal of a triangle is the unit vector orthogonal to its plane, it is computed as the normalized cross product of two of its edges. The STL format stores one normal per triangle, and the value is computed from the geometry instead of being taken from the data, since a mesh in index representation does not store normals at all.
mesh.face.normals(vertex_coords, faces)
vertex_coords |
n x 3 matrix of doubles, the vertex coordinates. |
faces |
n x 3 matrix of integers, the vertex indices of the triangles. |
n x 3 matrix of doubles, the normalized normal of every face. Rows of degenerate triangles (whose 3 vertices lie on one line, which includes triangles with repeated vertices) are zero vectors, since such triangles have no plane and hence no normal.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.