scalemesh: scale a mesh of class "mesh3d"

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/scalemesh.r

Description

scales (the vertices of a mesh by a scalar

Usage

1
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

rotmesh.onto

Examples

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


Morpho documentation built on May 19, 2017, 1:24 p.m.
Search within the Morpho package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.