centermesh3d: move the centroid of a mesh to a given coordinate

View source: R/centermesh3d.r

centermesh3dR Documentation

move the centroid of a mesh to a given coordinate

Description

move the centroid of a mesh to a given coordinate

Usage

centermesh3d(x, center = NULL)

Arguments

x

triangular mesh of class 'mesh3d'

center

coordinate where to translate the mesh, if center=NULL the centroid will be moved to the origin

Value

returns the translated mesh

Examples


require(Rvcg)
data(humface)
## Not run: 
require(rgl)
wire3d(humface, col=3)

## End(Not run)
humcenter <- centermesh3d(humface)
#view translated mesh
## Not run: 
require(rgl)
wire3d(humcenter, col=2)

## End(Not run)

zarquon42b/mesheR documentation built on July 1, 2024, 1:54 p.m.