vcgSmoothImplicit: Implicit Smoothes a triangular mesh

View source: R/vcgSmooth.r

vcgSmoothImplicitR Documentation

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
)

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).

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.

Author(s)

Zhengjia Wang

See Also

vcgPlyRead,vcgClean,vcgSmooth

Examples


data(humface)
smoothface <- vcgSmoothImplicit(humface)
## view
## Not run: 
require(rgl)
shade3d(smoothface, col=3)

## End(Not run)


zarquon42b/Rvcg documentation built on April 11, 2024, 3:17 a.m.