Learn R Programming

MeshesTools (version 1.0.0)

meshCentroid: Mesh centroid

Description

Computes the centroid of a closed mesh.

Usage

meshCentroid(mesh)

Value

The centroid of the mesh given as a numeric vector.

Arguments

mesh

a mesh given either as a list containing (at least) the two fields vertices (numeric matrix with three columns) and faces (integer matrix or list of integer vectors), otherwise as a rgl mesh (i.e. a mesh3d object)

Examples

Run this code
library(MeshesTools)
mesh <- cyclideMesh(a = 97, c = 32, mu = 57)
meshCentroid(mesh)

Run the code above in your browser using DataLab