updates vertex normals of a triangular meshes or point clouds
update vertex normals of a triangular meshes or point clouds
vcgUpdateNormals(mesh, type = 0, pointcloud = c(10, 0), silent = FALSE)
mesh |
triangular mesh of class 'mesh3d' or a n x 3 matrix containing 3D-coordinates. |
type |
select the method to compute per-vertex normals: 0=area weighted average of surrounding face normals; 1 = angle weighted vertex normals. |
pointcloud |
integer vector of length 2: containing optional parameters for normal calculation of point clouds. The first enty specifies the number of neighbouring points to consider. The second entry specifies the amount of smoothing iterations to be performed. |
silent |
logical, if TRUE no console output is issued. |
mesh with updated/created normals, or in case mesh
is a matrix, a list of class "mesh3d" with
vb |
4 x n matrix containing coordinates (as homologous coordinates |
normals |
4 x n matrix containing normals (as homologous coordinates |
data(humface) humface$normals <- NULL # remove normals humface <- vcgUpdateNormals(humface) ## Not run: pointcloud <- t(humface$vb[1:3,]) #get vertex coordinates pointcloud <- vcgUpdateNormals(pointcloud) require(Morpho) plotNormals(pointcloud)#plot normals ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.