rotate3D_lh: Rotate a 3D vector around the three axes in a left-handed...

View source: R/tools.r

rotate3D_lhR Documentation

Rotate a 3D vector around the three axes in a left-handed system

Description

Rotates a three-dimensional vector by the three angles specified around the three axes of a left-handed coordinate system.

Usage

rotate3D_lh(x, angles)

Arguments

x

The three-component vector(s) that is (are) to be rotated. In case of multiple vectors, they should be in the form of a 3xn array or matrix.

angles

A three-component vector that contains the angles by which to rotate around the axes in radians and in the order x, y, z. Positive angles rotate counter-clockwise in left-handed coordinate systems.

Details

If more than one angle is non-zero, the rotations will be applied in the order x-y-z.

Value

A three-component vector that contains the rotated x, or a matrix containing the rotated columns of x.

Note

Rotation is not as easily invertible as might seem apparent: rotate3D_lh(rotate3D_lh(vec, angles), -angles) != vec at least if there is more than one non-zero component in angles.


ime-luebeck/semgsim documentation built on April 14, 2022, 11:02 p.m.