0
$\begingroup$

Hello, I have an orientation P1 in a 3D space, represented as a quaternion [w x y z]. Then P1 is rotated using another quaternion (q1) with the formula

P2=q1*P1*q1'


Is there any formula in order to get q1 from P2 and P1?

Thank you.

$\endgroup$
2
  • $\begingroup$ What is an "orientation"? $\endgroup$
    – Igor Rivin
    Commented Apr 15, 2011 at 15:20
  • $\begingroup$ Please reopen this. This is tremendously helpful to solving a wide array of problems with transformations between two orientations. Orientation is defined as the rotation from [theta=0, phi=0, psi=0] to the direction of a pose. This question is clear: how do you find the transformation between two orientations expressed as quaternions? That is, what rotation gets you from one orientation to another? $\endgroup$ Commented Apr 28, 2017 at 1:48

1 Answer 1

4
$\begingroup$

I am not sure what the OP means by "orinentation", but if the question is about the rotation of one (unit) vector into another, the axis of such a rotation is the cross product of the two vectors (assumed unit) and the angle is the arccos of the scalar product. You can then read off the quaternion. See:

http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .