Learn R Programming

rotations (version 1.5)

log.SO3: Rotation logarithm

Description

Compute the logarithm of a rotation matrix, which results in a $3-by-3$ skew-symmetric matrix. This function maps the lie group $SO(3)$ into its tangent space, which is the space of all $3-by-3$ skew symmetric matrices, the lie algebra $so(3)$. For details see e.g. Moakher (2002).

Usage

"log" (x, ...)

Arguments

x
$n-by-9$ matrix where each row corresponds to a random rotation matrix.
...
additional arguments.

Value

Skew symmetric matrix $log(R)$.

References

Moakher M (2002). "Means and averaging in the group of rotations." SIAM Journal on Matrix Analysis and Applications, 24(1), pp. 1-16.

Examples

Run this code
Rs <- ruars(20, rcayley)

#Here we demonstrate how the logarithm can be used to determine the angle and
#axis corresponding to the provided sample

lRs <- log(Rs)               #Take the logarithm of the sample
Ws <- lRs[,c(6, 7, 2)]       #The appropriate diagonal entries are the axis*angle
lens <- sqrt(rowSums(Ws^2))
axes <- mis.axis(Rs)
angs <- mis.angle(Rs)
all.equal(axes, Ws/lens)
all.equal(angs, lens)

Run the code above in your browser using DataLab