Skip to content

angle returns different values for a unit quaternion and its antipodal quaternion #79

@empet

Description

@empet

If q is a unit quaternion, then q and -q define the same rotation:
$R_{-q}(v)=-qv(-\overline{q})= qv\overline{q}=R_q(v)$
Hence the rotation $R_{-q}$ has the same axis and angle of rotation as $R_q$.
Another argument::
If $q=\exp({\bf u} \theta/2)$ then $\mathtt{angle}(q)=\theta$.
$-q=-exp({\bf u}\theta/2)=-\cos(\theta/2)-u \sin(\theta/2)= \cos(\pi+\theta/2)+u \sin(\pi+\theta/2)$
Hence the rotation angle of $-q$ is $2\pi+\theta=\theta$ (modulo $2\pi$)
Quaternionic.jl returns two different angles for q and -q:
```
q = rotor(2, -1, 3, 1.5)
alpha = angle(q)
2.1033004250967466

beta = angle(-q)
4.17988488208284

alpha+beta
6.283185307179586

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions