More Rotations, Slerping




CS185c

Chris Pollett

Feb 20, 2019

Outline

Introduction

Axis-Angle Representations of Rotations

Quaternions

Quaternion Rotations

Some Special Cases and Terminology

Operations

In-Class Exercise

Pauli matrices

Rotations with quaternions

3D rotation diagram

Claim. Let `bb hat u` be a direction in `RR^3`, let `theta` be an angle, let `q = [[cos(theta/2)],[sin(theta/2)hat bb u]]`. Let `bb v` be any coordinate vector in `RR^3` written as pure quaternion. Let `R_(theta, bb hat u)` denote a rotation by angle `theta` about `bb hat u`. Set `bb w = R_(theta, bb hat u) bb v`. Then:
`q bb{v} q^(-1) = bb{w}`.

Proof. Given `bb v` let `bb v_1` denote the projection of `bb v` along `hat bb u` and let `bb v_2` denote the portion of `bb v` perpendicular to `hat bb u`. Finally, let `bb v_3 = bb v_1 times bb v_2` complete our coordinate system be the direction we are turning with `R_(theta, bb hat u)`. Note the map `bb v mapsto q bb{v} q^(-1)` is linear so
`q bb{v} q^(-1) = q bb{v_1} q^(-1) + q bb{v_2} q^(-1) = ||bb v_1||q hat bb{u} q^(-1) + q bb{v_2} q^(-1)`. So it suffices to show:

  1. `q hat bb{u} q^(-1) = hat bb u`. The axis of rotation is unchanged.
  2. `q bb{v_2} q^(-1) = R_(theta, hat bb u) bb v_2` for `bb v_2` perpendicular to `bb u`.

To see (1), let c and s denote the sine and cosine of `theta/2` notice:
`q hat bb{u} q^(-1) = [c, s hat bb u]^t[0, hat bb u]^tq^(-1)`
`= ([0 - s hat bb u cdot hat bb u, c hat bb u + s hat bb u times hat bb u]^t)q^(-1)`
`=( [-s, c hat bb u]^t)q^(-1)`. Notice multiplying the first `q` rotates `[0, hat bb u]` so not pure, multiplying by `q^(-1)` will reverse this.
`=( [-s, c hat bb u]^t)( [c, -s hat bb u]^t)`, using def for inverse from last day.
`=[-cs + cs hat bb u cdot hat bb u, s^2 hat bb u + c^2 hat bb u - cs hat bb u times hat bb u]^t`
`=[-cs + cs, (s^2 + c^2)hat bb u]^t`
`=[0, hat bb u]^t = hat bb u` as desired (we are abusing notation, identifying `[0, hat bb u]^t` with `hat bb u`).

For (2), a similar direct computation is done. We first multiply `q bb{v_2}` to get `[0, c bb v_2 + s bb v_3]^t`. Notice for the multiplying by `q` for this component only performs half of the rotation we want in the desire direction. Multiplying by `q^(-1)` will rotate the rest of the way. It is when we multiply this by `q^(-1)` that we make use of our angle formulas `cos theta = c^2 -s^2` and `sin theta = 2cs` to get that `q bb{v_2} q^(-1) = R_(theta, hat bb u) bb v_2`.

Powering

Slerping