Learn R Programming

Morpho (version 2.12)

scalemesh: scale a mesh of class "mesh3d"

Description

scales (the vertices of a mesh by a scalar

Usage

scalemesh(mesh, size, center = c("bbox", "mean", "none"))

Value

returns a scaled mesh

Arguments

mesh

object of class "mesh3d"

size

numeric: scale factor

center

character: method to position center of mesh after scaling: values are "bbox", and "mean". See Details for more info.

Author

Stefan Schlager

Details

The mesh's center is determined either as mean of the bounding box (center="bbox") or mean of vertex coordinates (center="mean") and then scaled according to the scaling factor. If center="none", vertex coordinates will simply be multiplied by "size".

See Also

rotmesh.onto

Examples

Run this code

data(nose)
#inflate mesh by factor 4
largenose <- scalemesh(shortnose.mesh,4)

Run the code above in your browser using DataLab