Transforms XYZ coordinates relative to a chosen origin

Transforms coordinates so that the origin lies at the reference vertex (defaults to the minimum of x, y, and z coordinates).

set_origin(mesh, reference = NULL)

Arguments

mesh

A triangular mesh of class mesh3d.

reference

Vector containing coordinates of the reference vertex. If left empty, this will default to the minimum of x, y, and z.

Value

mesh3d object

Examples

mesh <- set_origin(mcap)