Learn R Programming

rotations (version 0.2)

SO3: Rotation matrices

Description

Creates or tests for objects of class "SO3."

Usage

SO3(R, ...)

## S3 method for class 'default': SO3(R, theta = NULL, ...)

## S3 method for class 'Q4': SO3(R, ...)

## S3 method for class 'SO3': SO3(R, ...)

as.SO3(R)

is.SO3(R)

id.SO3

Arguments

R
object to be coerced or tested.
theta
vector of rotation angles.
...
additional arguments.

Value

  • as.SO3coerces its object into an SO3 type.
  • is.SO3returns TRUE or False depending on whether its argument satifies the conditions to be an rotation matrix. Namely, has determinant one and its transpose is its inverse.
  • SO3.defaultreturns an $n$-by-9 matrix where each row is a rotation matrix constructed from axis $U$ and angle theta.
  • SO3.Q4returns $n$-by-9 matrix where each row is a rotation matrix constructed from the corresponding quaternion.

format

id.SO3 is the identity rotation given by the the 3-by-3 identity matrix.

Details

Construct a 3-by-3 matrix to represent a rotation. Each rotation matrix can be interpreted as a rotation of some reference frame about the axis $U$ (of unit length) through the angle $\theta$. For each axis and angle the matrix is formed through $$R=\exp[\Phi(U\theta)]$$ If no angle of rotation are supplied then the length of each axis is taken to be the angle of rotation theta. If a Q4 object is given then this function will return the rotation matrix equivalent.