vcgQEdecim | R Documentation |
Decimates a mesh by adapting the faces of a mesh either to a target face number, a percentage or an approximate mesh resolution (a.k.a. mean edge length
vcgQEdecim(
mesh,
tarface = NULL,
percent = NULL,
edgeLength = NULL,
topo = FALSE,
quality = TRUE,
bound = FALSE,
optiplace = FALSE,
scaleindi = TRUE,
normcheck = FALSE,
qweightFactor = 100,
qthresh = 0.3,
boundweight = 1,
normalthr = pi/2,
silent = FALSE
)
mesh |
Triangular mesh of class "mesh3d" |
tarface |
Integer: set number of target faces. |
percent |
Numeric: between 0 and 1. Set amount of reduction relative to existing face number. Overrides tarface argument. |
edgeLength |
Numeric: tries to decimate according to a target mean edge length. Under the assumption of regular triangles, the edges are half as long by dividing the triangle into 4 regular smaller triangles. |
topo |
logical: if TRUE, mesh topology is preserved. |
quality |
logical: if TRUE, vertex quality is considered. |
bound |
logical: if TRUE, mesh boundary is preserved. |
optiplace |
logical: if TRUE, mesh boundary is preserved (may lead to unwanted distortions in some cases). |
scaleindi |
logical: if TRUE, decimatiion is scale independent. |
normcheck |
logical: if TRUE, normal directions are considered. |
qweightFactor |
numeric: >= 1. Quality range is mapped into a squared 01 and than into the 1 - QualityWeightFactor range. |
qthresh |
numeric: Quality threshold for decimation process. |
boundweight |
numeric: Weight assigned to mesh boundaries. |
normalthr |
numeric: threshold for normal check in radians. |
silent |
logical, if TRUE no console output is issued. |
This is basically an adaption of the cli tridecimator from vcglib
Returns a reduced mesh of class mesh3d.
Stefan Schlager
vcgSmooth
data(humface)
##reduce faces to 50%
decimface <- vcgQEdecim(humface, percent=0.5)
## view
## Not run:
require(rgl)
shade3d(decimface, col=3)
## some light smoothing
decimface <- vcgSmooth(decimface,iteration = 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.