vcg_update_normals | R Documentation |
Update vertex normal
vcg_update_normals(
mesh,
weight = c("area", "angle"),
pointcloud = c(10, 0),
verbose = FALSE
)
mesh |
triangular mesh or a point-cloud (matrix of 3 columns) |
weight |
method to compute per-vertex normal vectors: |
pointcloud |
integer vector of length 2: containing optional parameters for normal calculation of point clouds; the first entry specifies the number of neighboring points to consider; the second entry specifies the amount of smoothing iterations to be performed. |
verbose |
whether to verbose the progress |
A 'mesh3d'
object with normal vectors.
if(is_not_cran()) {
# Prepare mesh with no normal
data("left_hippocampus_mask")
mesh <- vcg_isosurface(left_hippocampus_mask)
mesh$normals <- NULL
# Start: examples
new_mesh <- vcg_update_normals(mesh, weight = "angle",
pointcloud = c(10, 10))
rgl_view({
rgl_call("mfrow3d", 1, 2)
rgl_call("shade3d", mesh, col = 2)
rgl_call("next3d")
rgl_call("shade3d", new_mesh, col = 2)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.