I am interested in implementing a clean solution that provides an alternative to 4x4 matrices for 3D conversion. Quaternions provide the equivalent of rotation, but not translation. Therefore, in addition to the quaternion, you need an additional translation vector (tx, ty, tz). I always saw that he stated that you need 12 values ββfor the matrix representation and only 7 for the quaternion based representation.
I do not understand how to manipulate translation values.
Quaternion rotation is not a problem.
For the vector v, the x axis vector and angle a:
q = cos(a/2) + x sin(a/2)
To rotate a vector:
v' = qvq^-1
With multiple rotations, you can apply transformations to the quaternion, and only when you have the final rotation, you must apply it to the data. This is why matrix transformation is so beautiful in 3D graphics systems.
So now, if it includes translation, what should I do?
This vector transformation:
T = (tx,ty,tz) v' = qvq^-1 + T
If I want to apply the rotation and translation operation to this, I will have to change T and q. What should be the result?
source share