Learn R Programming

Morpho (version 2.6)

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

Description

calculates the barycenters for all faces of a triangular mesh

Usage

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

Run this code
# NOT RUN {

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
# }

Run the code above in your browser using DataLab