View source: R/create_rotation_matrix_from_vector.r
create_rotation_matrix_from_vector | R Documentation |
Converts a 3-element rotation vector (axis-angle representation) into a 3x3 rotation matrix,
using Rodrigues' rotation formula. Equivalent to Python's
scipy.spatial.transform.Rotation.from_rotvec
.
create_rotation_matrix_from_vector(theta3, in_degrees = FALSE)
theta3 |
A numeric vector of length 3, representing the rotation vector. Its direction specifies the axis of rotation, and its magnitude specifies the angle (in radians by default). |
in_degrees |
Logical. If |
A 3x3 numeric matrix representing the rotation.
https://en.wikipedia.org/wiki/Axis-angle_representation#Rotation_vector https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.transform.Rotation.from_rotvec.html
create_rotation_matrix_from_vector(c(0.5, 0.4, 0.3))
create_rotation_matrix_from_vector(c(30, 0, 0), in_degrees = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.