Revision d5ee02003d0bdaca6d65b4f257804dcd7bff08df (click the page title to view the current version)

Representations of 3D Motion

Changes from d5ee02003d0bdaca6d65b4f257804dcd7bff08df to 690004f5faf8e817ef453a2d037085d060316aff

---
title: Representations of 3D Motion
categories: lectures 3D mathematics
geometry: margin=2cm
fontsize: 12pt
---

# Representation of Rotations

Consider what happens when an object rotates continuously over time,
i.e. the rotational matrix is a function $R(t)$ of time.

## The derivative

1. Rotation is represented by an orthogonal matrix $R$
   $$R(t)\cdot R^T(t)=I$$
2. Implicit derivation
   $$\dot R(t)\cdot R^T(t)+R(t)\cdot\dot R^T(t)=I$$
3. by transposing the product and moving one term across, we have
   $$\dot R(t)\cdot R^T(t) = -(\dot R(t)\cdot R^T(t))^T$$
4. This is a skew-symmetric matrix, hence
   $$\exists \vec{\omega}\in\mathbb{R}^3, \text{s.t.}
     \dot R^T(t)\cdot R^T(t) = \hat\omega(t)$$
5. Multiply by $R(t)$ to get
   $$\dot R^T(t) = \hat\omega(t)\cdot R(t)$$
6. If $R(t_0)=I$ as an initial condition, then $\dot R(t)=\hat\omega(t)$

Note $so(3)$ is the space of all skew-symmetric matrices.

## The differential equation

Let $x(t)$ be a point rotated over time.

Assume that $\omega$ is constant.


1. **ODE:**
   $$\dot x(t) = \hat\omega x(t), \quad x(t)\in\mathbb{R}^3$$
2. Solution:
   $$x(t) = e^{\hat\omega t} x(0)$$
3. where
   $$e^{\hat\omega t} = I + \sum_{i=1}^\infty \frac{(\hat\omega )^i}{i!}$$
4. The rotational matrix $$R(t)=e^{\hat\omega t}$$
   signifies a rotation around the axis $\omega$ by $t$ radians.

$$\exp : \mathrm{so}(3)\to\mathrm{SO}(3); \hat\omega\mapsto e^{\hat\omega}$$

This is a map from a Lie algebra to a Lie group.

For any $R$, such an $\hat\omega$ can be found,
not necessarily unique.

Rotation is obviously periodic.  A rotation by $2\pi$ is back to start.

**Note** Only three degrees of freedom.

## Logarithm

$$
R = 
\begin{bmatrix}
r_{11} & r_{12} & r_{13} \\
r_{21} & r_{22} & r_{23} \\
r_{31} & r_{32} & r_{33} 
\end{bmatrix}
= \exp(\hat\omega)
$$
where
$$
||\omega|| = \cos^{-1}\big(\frac{\trace(R)-1}2\big)
||\omega|| = \cos^{-1}\big(\frac{\tr(R)-1}2\big)
$$
and

$$
\frac{\omega}{||\omega||} = \frac1{2\sin(||\omega||)}
\begin{bmatrix} r_{32}-r_{23}\\ r_{13}-r_{31}\\ r_{21}-r_{12} \end{bmatrix}
$$


# Homogenous Co-ordinates

## Six degrees of Freedom

+ Translation - add $T=[y_1,y_2,y_3]$
+ Rotation - multiply by $\exp(\hat{[\omega_1,\omega_2,\omega_3]})$
+ $x\mapsto xR+T$ is affine, not linear

## Points in Homogenous Co-ordinates

+ Point $\textbf{X}=[X_1,X_2,X_3]^\mathrm{T}\in\mathbb{R}^3$
+ Embed in $\mathbb{R}^4$ as
    $\mathbf{\tilde X}=[X_1,X_2,X_3,1]^\mathrm{T}\in\mathbb{R}^4$
+ Vector $\vec{pq}$ is represented as
    $$\mathbf{\tilde X}(q)-\mathbf{\tilde X}(p) =
    \begin{bmatrix} \mathbf{ X}(q) \\ 1 \end{bmatrix}
    - \begin{bmatrix} \mathbf{ X}(p) \\ 1 \end{bmatrix}
    =
    \begin{bmatrix} \mathbf{X}(q) - \mathbf{X}(p) \\ 0 \end{bmatrix}$$
+ In homogenous co-ordinates,
    - points have 1 in last position
    - vectors have 0 in last position
+ Arithmetics
    + Point + Point is undefined
    + Vector + Vector is a Vector
    + Point + Vector is a Point

## Rotation 

Let $R$ be a $3\times3$ rotation matrix.

$$
   R\cot\vec{x}=
   R
\cdot
\begin{bmatrix} x\\y\\z \end{bmatrix}
=
\begin{bmatrix} x'\\y'\\z' \end{bmatrix}
$$

$$
\begin{bmatrix}
   R & 0 \\
   0 & 1
\end{bmatrix}
\cdot
\begin{bmatrix} x\\y\\z\\1 \end{bmatrix}
=
\begin{bmatrix} x'\\y'\\z'\\1 \end{bmatrix}
$$

## Arbitrary motion

What happens if we change some of the zeroes?

$$
\begin{bmatrix}
   R & \vec{t} \\
   0 & 1
\end{bmatrix}
\cdot
\begin{bmatrix} x\\y\\z\\1 \end{bmatrix}
=
\begin{bmatrix} x'\\y'\\z'\\0 \end{bmatrix}
+
\begin{bmatrix} \vec{t}\\1 \end{bmatrix}
=R\vec{x}+\vec{t}
$$

We have rotated and translated!

## Motion as a function of time

$$
g =
\begin{bmatrix}
   R & T\\
   0 & 1
\end{bmatrix}
\in \mathrm{SE}(3)
$$

+ This is a group 

$$g_1\cdot g_2 =
\begin{bmatrix} R_1 & T_1\\ 0 & 1 \end{bmatrix}\cdot
\begin{bmatrix} R_2 & T_2\\ 0 & 1 \end{bmatrix}
=
\begin{bmatrix} R_1R_2 & R_1T_2+T_1\\ 0 & 1 \end{bmatrix}
\in \mathrm{SE}(3)
$$
    
$$g^{-1} =
\begin{bmatrix} R & T\\ 0 & 1 \end{bmatrix}^{-1}
=
\begin{bmatrix} R^T & -R^TT\\ 0 & 1 \end{bmatrix}
$$


# Canonical Exponential Co-ordinates


1.  A homogeneous motion matrix
    $$ g(t) = \begin{bmatrix} R(t) & T(t)\\ 0 & 1 \end{bmatrix} $$
2.  We can differentiate, invert, and multiply to get
    $$
    \dot g(t)\cdot g^{-1}(t) =
    \begin{bmatrix}
    \dot R(t) R^T(t) & \dot T(t)- \dot R(t)R^T(t)T(t) \\
    0 & 0 \end{bmatrix}
    \in\mathbb{R}^{4\times4}
    $$
3.  $\dot R(t) R^T(t)$ is skew-symmetric, hence
    $$
    \dot g(t)\cdot g^{-1}(t) =
    \begin{bmatrix}
    \hat\omega & \dot T(t)- \dot R(t)R^T(t)T(t) \\
    0 & 0 \end{bmatrix}
    $$
    for some $\omega\in\mathrm{so}(3)$
3.  Write 
    $$
    v(t)= \dot T(t)- \hat\omega(t)T(t) \\
    \dot g(t)\cdot g^{-1}(t) =
    \begin{bmatrix}
    \hat\omega & \dot v(t) \\
    0 & 0 \end{bmatrix}
    $$
4.  Call this matrix $\hat\xi(t)$
5.  This give the differential equation
    $$\dot g(t) = (\dot g(t) g^{-1})g(t)$$

+ $v(t)$ is linear velocity
+ $\omega(t)$ as angular velocity

# Velocity

**Adjoint Map**  
$\mathrm{ad}_g: \mathrm{se}(3)\to\mathrm{se}(3);\quad \hat\xi\mapsto g\hat\xi g^{-1}$