Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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"))

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.

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".

Value

returns a scaled mesh

Author(s)

Stefan Schlager

See Also

Examples

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

Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.