genR | R Documentation |
Generate rotations in matrix format using Rodrigues' formula or quaternions.
genR(r, S = NULL, space = "SO3")
r |
vector of angles. |
S |
central orientation. |
space |
indicates the desired representation: rotation matrix "SO3" or quaternions "Q4." |
Given a vector U=(u1,u2,u3)' in R^3 of length one and angle of rotation r, a 3-by-3 rotation matrix is formed using Rodrigues' formula
cos(r)I+sin(r)Φ(U)+(1-cos(r))UU'
where I is the 3-by-3 identity matrix, Φ(U) is a 3-by-3 skew-symmetric matrix with upper triangular elements -u3, u2 and -u1 in that order.
For the same vector and angle a quaternion is formed according to
q=[cos(theta/2),sin(theta/2)U]'.
A n-by-p matrix where each row is a random rotation matrix (p=9) or quaternion (p=4).
r <- rvmises(20, kappa = 0.01) Rs <- genR(r, space = "SO3") Qs <- genR(r, space = "Q4")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.