3
$\begingroup$

I have the following problem:

Rotations can be done by using quaternions. My understanding is, that to rotate a vector around a quaternion, the vector has to be transformed to a 4-dimensional vector: v = [x,y,z] to v'= [0,x,y,z] This vector can now be rotated around the quaternion using v'2 = q*v'*q' where q' is the conjugate quaternion and the quaternion product needs to be used.

My problem is, I don't understand how to get a 3D vector from the new, 4-dimensional vector v'2 since v'2 = [w,ai,bj,ck]. Do I just disregard w and use v_new = [a,b,c] as my new vector or do I have to do a specific transformation?

$\endgroup$
  • $\begingroup$ Unless you did something wrong you should automatically have $w=0$ after computing $qv'q'$. But, yes, $v_{new}=(a,b,c)$, where $qv'q'=ai+bj+ck$ $\endgroup$ – Jyrki Lahtonen Sep 7 '18 at 6:02
  • $\begingroup$ That's it! Thank you very much!! $\endgroup$ – Robert Reichel Sep 7 '18 at 8:48
  • $\begingroup$ Glad to help! By the way, a namesake of yours is an international level hockey star (originally from the Czech republic). Are you related by any chance :-) $\endgroup$ – Jyrki Lahtonen Sep 7 '18 at 10:32
  • $\begingroup$ No, unfortunately not. I found out about that when I googled myself but sadly I don't know him :( $\endgroup$ – Robert Reichel Sep 7 '18 at 11:54
1
$\begingroup$

Thanks to Jyrki Lahtonen for solving my problem!

If the math is done correctly, the resulting quaternion after q * v * q' should have the form v' = [w, ai, bj, ck] where w = 0 and the new vector is v' = [a,b,c]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.