Learn R Programming

Rvcg (version 0.6-3)

vcgSample: Subsample mesh surface

Description

subsample surface of a triangular mesh

Usage

vcgSample(mesh, SampleNum = 100, type = c("km", "pd", "mc"), MCsamp = 20,
  geodes = TRUE, strict = FALSE)

Arguments

mesh
triangular mesh of class 'mesh3d'
SampleNum
integer Number of sampled points
type
seclect sampling type ("mc"=MonteCarlo Sampling, "pd"=PoissonDisk Sampling,"km"=kmean clustering)
MCsamp
MonteCarlo sample iterations used in PoissonDisk sampling.
geodes
maximise geodesic distance between sample points (only for Poisson Disk sampling)
strict
if type="pd" and the amount of coordinates exceeds SampleNum, the resulting coordinates will be subsampled again by kmean clustering to reach the requested number.

Value

  • sampled points

Details

Poisson disk subsampling will not generate the exact amount of coordinates specified in SampleNum, depending on MCsamp the result wil bee more or less coordinates.

Examples

Run this code
data(humface)
ss <- vcgSample(humface,SampleNum = 500, type="pd")
require(rgl)
points3d(ss)

Run the code above in your browser using DataLab