vcgSample | R Documentation |
Subsamples surface of a triangular mesh and returns a set of points located on that mesh
vcgSample(
mesh,
SampleNum = 100,
type = c("km", "pd", "mc"),
MCsamp = 20,
geodes = TRUE,
strict = FALSE,
iter.max = 100,
threads = 0
)
mesh |
triangular mesh of class 'mesh3d' |
SampleNum |
integer: number of sampled points (see |
type |
character: seclect sampling type ("mc"=MonteCarlo Sampling, "pd"=PoissonDisk Sampling,"km"=kmean clustering) |
MCsamp |
integer: MonteCarlo sample iterations used in PoissonDisk sampling. |
geodes |
logical: maximise geodesic distance between sample points (only for Poisson Disk sampling) |
strict |
logical: if |
iter.max |
integer: maximum iterations to use in k-means clustering. |
threads |
integer number of threads to use for k-means clustering |
Poisson disk subsampling will not generate the exact amount of coordinates specified in SampleNum
, depending on MCsamp
the result will contain more or less coordinates.
sampled points
data(humface)
ss <- vcgSample(humface,SampleNum = 500, type="km",threads=1)
## Not run:
require(rgl)
points3d(ss)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.