createTransform: Create transformation matrices

View source: R/transformSimplex.R

createTransformR Documentation

Create transformation matrices

Description

This function takes a basis, consisting of an n*m change of basis matrix and an n-vector representing the origin of the m-space, and generates a matrix to transform points in the m-space, given in homogeneous coordinates, to the n-space.

The inverse transform can also be generated, and conversion can be to homogeneous coordinates instead of Cartesian ones.

Usage

createTransform(basis, inverse=FALSE, keepHomogeneous=inverse)

Arguments

basis

Basis (and origin) for the m-space (see solution.basis)

inverse

TRUE to convert from n-space coordinates to m-space coordinates

keepHomogeneous

TRUE to convert to homogeneous coordinates rather than Cartesian

Details

Multiply a coordinate vector in homogeneous coordinates by pre-multiplying by the generated matrix (see examples).

Value

A transformation matrix.

Author(s)

Gert van Valkenhoef

See Also

solution.basis


hitandrun documentation built on May 28, 2022, 1:09 a.m.