Learn R Programming

Rvcg (version 0.24)

vcgSmoothImplicit: Implicit Smoothes a triangular mesh

Description

Applies implicit smoothing algorithms on a triangular mesh.

Usage

vcgSmoothImplicit(
  mesh,
  lambda = 0.2,
  useMassMatrix = TRUE,
  fixBorder = FALSE,
  useCotWeight = FALSE,
  degree = 1L,
  lapWeight = 1,
  SmoothQ = FALSE
)

Value

returns an object of class "mesh3d" with:

vb

4xn matrix containing n vertices as homolougous coordinates.

normals

4xn matrix containing vertex normals.

it

4xm matrix containing vertex indices forming triangular faces.

Arguments

mesh

triangular mesh stored as object of class "mesh3d".

lambda

numeric: the amount of smoothness, useful only if useMassMatrix is TRUE; default is 0.2

useMassMatrix

logical: whether to use mass matrix to keep the mesh close to its original position (weighted per area distributed on vertices); default is TRUE

fixBorder

logical: whether to fix the border vertices of the mesh; default is FALSE

useCotWeight

logical: whether to use cotangent weight; default is FALSE (using uniform 'Laplacian')

degree

integer: degrees of 'Laplacian'; default is 1

lapWeight

numeric: weight when useCotWeight is FALSE; default is 1.0

SmoothQ

logical: whether to smooth the quality (distances to target).

Author

Zhengjia Wang

See Also

vcgPlyRead,vcgClean,vcgSmooth

Examples

Run this code

data(humface)
smoothface <- vcgSmoothImplicit(humface)
## view
if (FALSE) {
require(rgl)
shade3d(smoothface, col=3)
}

Run the code above in your browser using DataLab