vcgSmooth: Smoothes a triangular mesh

View source: R/vcgSmooth.r

vcgSmoothR Documentation

Smoothes a triangular mesh

Description

Applies different smoothing algorithms on a triangular mesh.

Usage

vcgSmooth(
  mesh,
  type = c("taubin", "laplace", "HClaplace", "fujiLaplace", "angWeight",
    "surfPreserveLaplace"),
  iteration = 10,
  lambda = 0.5,
  mu = -0.53,
  delta = 0.1
)

Arguments

mesh

triangular mesh stored as object of class "mesh3d".

type

character: select smoothing algorithm. Available are "taubin", "laplace", "HClaplace", "fujiLaplace", "angWeight" (and any sensible abbreviations).

iteration

integer: number of iterations to run.

lambda

numeric: parameter for Taubin smooth (see reference below).

mu

numeric:parameter for Taubin smooth (see reference below).

delta

numeric: parameter for Scale dependent laplacian smoothing (see reference below).and maximum allowed angle (in radians) for deviation between normals Laplacian (surface preserving).

Details

The algorithms available are Taubin smoothing, Laplacian smoothing and an improved version of Laplacian smoothing ("HClaplace"). Also available are Scale dependent laplacian smoothing ("fujiLaplace") and Laplacian angle weighted smoothing ("angWeight")

Value

returns an object of class "mesh3d" with:

vb

4xn matrix containing n vertices as homolougous coordinates.

normals

4xn matrix containing vertex normals.

quality

vector: containing distances to target.

it

4xm matrix containing vertex indices forming triangular faces.

Note

The additional parameters for taubin smooth are hardcoded to the default values of meshlab, as they appear to be the least distorting

Author(s)

Stefan Schlager

References

Taubin G. 1995. Curve and surface smoothing without shrinkage. In Computer Vision, 1995. Proceedings., Fifth International Conference on, pages 852 - 857.

Vollmer J., Mencl R. and Mueller H. 1999. Improved Laplacian Smoothing of Noisy Surface Meshes. Computer Graphics Forum, 18(3):131 - 138.

Schroeder, P. and Barr, A. H. (1999). Implicit fairing of irregular meshes using diffusion and curvature flow: 317-324.

See Also

vcgPlyRead,vcgClean

Examples


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

## End(Not run)


Rvcg documentation built on Sept. 30, 2024, 9:39 a.m.