barycenter: calculates the barycenters for all faces of a triangular mesh

Description Usage Arguments Value See Also Examples

View source: R/barycenter.r

Description

calculates the barycenters for all faces of a triangular mesh

Usage

1
barycenter(mesh)

Arguments

mesh

triangular mesh of class 'mesh3d'

Value

k x 3 matrix of barycenters for all k faces of input mesh.

See Also

closemeshKD

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(nose)
bary <- barycenter(shortnose.mesh)
## Not run: 
require(rgl)
##visualize mesh
wire3d(shortnose.mesh)
# visualize barycenters
points3d(bary, col=2)
## now each triangle is equipped with a point in its barycenter

## End(Not run)

Morpho documentation built on Sept. 9, 2021, 9:07 a.m.