Generate rotations according to Rodrigues' formula.
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."
Value
A $n\times p$matrix where each row is a
random rotation matrix ($p=9$) or quaternion
($p=4$).
Details
Given a vector $U=(u_1,u_2,u_3)^\top\in
R^3$ of length one and angle of
rotation $r$, a rotation can be formed using
Rodrigues' formula $$\cos(r)I_{3\times
3}+\sin(r)\Phi(U)+(1-\cos(r))UU^\top$$
where $I_{3\times 3}$ is the $3\times
3$ identity matrix, $\Phi(U)$ is a
$3\times 3$ skew-symmetric matirix with upper
triangular elements $-u_3$, $u_2$ and
$-u_1$ in that order.