rotate3D_lh | R Documentation |
Rotates a three-dimensional vector by the three angles specified around the three axes of a left-handed coordinate system.
rotate3D_lh(x, angles)
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. |
If more than one angle is non-zero, the rotations will be applied in the order x-y-z.
A three-component vector that contains the rotated x, or a matrix containing the rotated columns of x.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.