I m having hard time to understand Quaternions and to use them in my engine for rotating object.
I m looking for step by step explanation, actually a correction of my view of Quaternions.
Here is how I understand they work.
q = cos(40*) + sin(40)(i+j+k)
->what I understand is that i+j+k represents the axis of rotation. Basically if i = 1 that means we rotate object around X-axis.
Formula q * point * p-1, is what I dont quite understand. Lets for the sake say I understand why forumla goes like this. What I dont seems to get how would I apply this to my engine to rotate object.
What I tried is to create 3dVector with object position, example (0,0,-5). I would use quaternion that would rotate this vector around y axis, so q * ThisVector * q(conjugate), and then result I would put in translate matrix. But no work.
I cant seem to find a way to implement them. I saw some articles on quaternion to matrices, But what do I put in that matrix, a result from qThisVectorq(conjugate) or it is just q that is transfromed in matrix?