rMatrix: Rotation matrix along the z axis

Description Usage Arguments Details Value Note Author(s) References Examples

Description

Compute the rotation matrix by an angle θ along the z axis

Usage

1
rMatrix(theta)

Arguments

theta

The rotation angle, in radians

Details

The counterclockwise 3 x 3 rotation matrix by an angle θ along the z axis is defined as:

≤ft[ \begin{array}{ccc} \cos θ & -\sin θ & 0 \\ \sin θ & \cos θ & 0 \\ 0 & 0 & 1 \\ \end{array} \right]

Value

A 3 x 3 matrix

Note

This is a low-level function.

Author(s)

Federico Comoglio, federico.comoglio@bsse.ethz.ch

References

Weisstein, Eric W. "Rotation Matrix." From MathWorld–A Wolfram Web Resource, http://mathworld.wolfram.com/RotationMatrix.html

Examples

1
2
3
4
5
##Rotation matrix by theta = 45 degrees
rMatrix(pi/4)

##to rotate clockwise by 45 degrees
rMatrix(-pi/4)

FedericoComoglio/Rknots documentation built on May 6, 2019, 4:35 p.m.