vcgSmooth | R Documentation |
Applies different smoothing algorithms on a triangular mesh.
vcgSmooth(
mesh,
type = c("taubin", "laplace", "HClaplace", "fujiLaplace", "angWeight",
"surfPreserveLaplace"),
iteration = 10,
lambda = 0.5,
mu = -0.53,
delta = 0.1
)
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). |
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")
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. |
The additional parameters for taubin smooth are hardcoded to the default values of meshlab, as they appear to be the least distorting
Stefan Schlager
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.
vcgPlyRead,vcgClean
data(humface)
smoothface <- vcgSmooth(humface)
## view
## Not run:
require(rgl)
shade3d(smoothface, col=3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.