Learn R Programming

Rvcg (version 0.24)

vcgVolume: Compute volume for manifold meshes

Description

Compute volume for manifold meshes

Usage

vcgVolume(x)

Value

returns volume

Arguments

x

triangular mesh of class mesh3d

Examples

Run this code
mysphere <- vcgSphere()
vcgVolume(mysphere)
if (FALSE) {
## here is an example where the mesh has some non-manifold vertices

mysphere <- vcgSphere(normals=FALSE)
## add a degenerate face
mysphere$it <- cbind(mysphere$it,c(1,2,1))
try(vcgVolume(mysphere))

## fix the error using vcgClean():
vcgVolume(vcgClean(mysphere,sel=0:6,iterate=TRUE))
}


Run the code above in your browser using DataLab