| compute_vertex_normals | R Documentation |
Computes smooth vertex normals by averaging face normals. Returns
the same mesh with a normals component (Nx3 numeric matrix).
Useful for imported meshes that lack pre-computed normals.
compute_vertex_normals(mesh)
mesh |
A mesh descriptor list with |
The mesh with a normals component added.
mesh <- generate_cuboid(c(0, 0, 0), c(1, 1, 1))
mesh <- compute_vertex_normals(mesh)
nrow(mesh$normals)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.