I studied computer science at university while ago, we used homogeneous co-ordinates, I understand the basic operations of quaternion up to some level!, The conversion were mentioned but not explained so I know quaternion can be transformed into matrix vice verse, theoretically so far.
Rotation matrix as I understand is a normal matrix that represent a certain rotation i.e rotation around X axis R.x can be represented as
R.x = $ \left[ \begin{matrix} 1 & 0 & 0 & 0 \\ 0 & \cosθ & -\sinθ & 0 \\ 0 & \sinθ & \cosθ & 0 \\ 0 & 0 & 0 & 1 \\ \end{matrix}\right] $ ,
This is a rotation matrix, right?
Assuming the answer to the previous question is yes then, Now what confuses me and I need to understand is the next part concerning the conversion quaternion.
Why there are more than equation to convert between quaternion and matrix? arent they supposed to be different representation to the same thing, so there should have one formula to convert from and to?
1- what does it means to convert quaternion to rotation matrix using this formula. $ \left[ \begin{matrix} 1-2y^2-2z^2 & 2xy-2sz & 2xz+2sy \\ 2xy+2sz & 1-2x^2-2z^2 & 2yz-2sx \\ 2xz-2sy & 2yz-2sx & 1-2x^2-2y^2 \\ \end{matrix} \right] $
2- and the difference between the previous formula and converting quaternion to matrix using $ \left[ \begin{matrix} a & -b & -c & -d \\ b & a & -d & c \\ c & d & a & -b \\ d & -c & b & a \\ \end{matrix}\right] $
3- when and why to use each formula? what is the input and the output of the previous conversions