Rotation Matrix to Quaternion Expressions

228 Views Asked by At

I am wondering if someone could give some insight on how the four expressions are derived in this example. I was able to understand how to construct a quaternion to rotation matrix. However I am having some troubles seeing how they pulled the components out from the matrix. Here is the problem below.

Rotation Matrix to Quaternion

1

There are 1 best solutions below

2
On BEST ANSWER

If you want to get $(x,y,z,w)$ from the matrix, as they say, you can note that for example

$m_{00} = 1 -2y^2-2z^2$

$m_{11} = 1 -2x^2-2z^2$

$m_{22} = 1 -2x^2-2y^2$

So you can combine them as they suggest to get $$1+m_{00}-m_{11}-m_{22} = 1 + (1 -2y^2 -2z^2) -1 +2x^2 + 2z^2 - 1 + 2x^2 + 2y^2$$ from which everything cancels except for $4x^2$ as they say. Given that, you can evaluate $x$, and that enables you to substitute into the other equations and find $y,z$ and $w$.