rot.matrix: Rotation matrix from a rotation axis and angle of rotation

View source: R/rot.matrix.R

Rotation matrix from a rotation axis and angle of rotationR Documentation

Rotation matrix from a rotation axis and angle of rotation

Description

It calculates a rotation matrix from a rotation axis and angle of rotation.

Usage

rot.matrix(ksi, theta, rads = FALSE)

Arguments

ksi

The rotation axis, a vector with two elements, the first is the latitude and the second is the longitude.

theta

The angle of rotation.

rads

If both the ksi and theta are in rads, this should be TRUE. If both the ksi and theta are in degrees, this should be FALSE.

Details

The function accepts as arguments the rotation axis and the angle of rotation and it calcualtes the requested rotation matrix.

Value

A 3 x 3 rotation matrix.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Giorgos Athineou <gioathineou@gmail.com>.

References

Course webpage of Howard E. Haber. http://scipp.ucsc.edu/~haber/ph216/rotation_12.pdf

Ted Chang (1986). Spherical Regression. Annals of Statistics, 14(3): 907–924.

See Also

Arotation, rotation, rsop

Examples

ksi <- c(25.31, 24.29)
theta <- 2.38
A <- rot.matrix(ksi, theta, rads = FALSE)
A
Arotation(A)

Directional documentation built on Oct. 12, 2023, 1:07 a.m.