This function takes a basis, consisting of an \(n \times 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.
createTransform(basis, inverse=FALSE, keepHomogeneous=inverse)
Basis (and origin) for the \(m\)-space (see solution.basis
)
TRUE to convert from \(n\)-space coordinates to \(m\)-space coordinates
TRUE to convert to homogeneous coordinates rather than Cartesian
A transformation matrix.
Multiply a coordinate vector in homogeneous coordinates by pre-multiplying by the generated matrix (see examples).