genR {rotations} | R Documentation |
Generate rotations
Description
Generate rotations in matrix format using Rodrigues' formula or quaternions.
Usage
genR(r, S = NULL, space = "SO3")
Arguments
r |
vector of angles. |
S |
central orientation. |
space |
indicates the desired representation: rotation matrix "SO3" or quaternions "Q4." |
Details
Given a vector of length one and angle of rotation
, a
rotation
matrix is formed using Rodrigues' formula
where is the
identity matrix,
is a
skew-symmetric matrix
with upper triangular elements
,
and
in that order.
For the same vector and angle a quaternion is formed according to
Value
A matrix where each row is a random rotation matrix (
) or quaternion (
).
Examples
r <- rvmises(20, kappa = 0.01)
Rs <- genR(r, space = "SO3")
Qs <- genR(r, space = "Q4")
[Package rotations version 1.6.5 Index]