Learn R Programming

vectools (version 0.3.0)

76_post-multiplication_transformation_matrices: Post-Multiplication Transformation Matrices

Description

Constructors for constructing one or more transformation matrices.

Usage

bscl2 (x, y=x, …, about)
btrl2 (x=0, y=0)
brot2 (theta, …, about)

bscl3 (x, y=x, z=x) btrl3 (x=0, y=0, z=0)

brot3x (theta) brot3y (theta) brot3z (theta)

Arguments

x, y, z

Numeric vectors, x, y and z transformation parameters.

theta

Numeric vector, the angle in radians.

about

Length-two numeric vector, giving center point for transformation.

Ignored.

Value

A matrix or a 1d MatrixArray.

2d transformations are 3x3 matrices and 3d transformations are 4x4 matrices.

Details

These matrices are designed for post-multiplication. They go after the data matrix.

Pre and post scaling matrices are the same.

In 2d rotation matrices, positive theta values rotate counter-clockwise.

3d rotation matrices, are the same as the 2d matrices, except for having an extra row and column. (Whether they're clockwise or counter-clockwise, depends on one's coordinate system).

See Also

MatrixArray

Binary Operators This describes how to perform operations on MatrixArray objects.

Pre-Multiplication Transformation Matrices

vt3.testplot, vt3.testplot

Examples

Run this code
# NOT RUN {
########################################
#2d static examples
########################################
#centered hexagon
v <- regPolygon (6)
vt3.testplot (v)

#four hexagons, different sizes
v2 <- v %]*% bscl2 (seq (1.3, 0.7,, 4) )
vt3.testplot (v2)
# }

Run the code above in your browser using DataLab