Quaternions
I understand that orientations (rotations) can be represented as quaternion e.g. (0 0.38268 0 0.92388) represents a 45 degree rotation along the X axis. I can work the calculation for this quaternion backwards and get 44.999 degrees as the answer.
But what about this (0.35355 0.35355 0.14645 0.85355)? I know the X and Y axis are involved, but stumped on how you calculate the angle(s) used in this example. Any ideas????
Here is a simplified way to get the axis/angle representation from a quaternion:
halfangle = acos( w ); // in radiansangle = halfangle * 2; // in radiansaxisX = x / sin( halfangle );axisY = y / sin( halfangle );axisZ = z / sin( halfangle );
BTW, [ 0 0.38268 0 0.92388 ] represents a 45 degree rotation around the Y axis (assuming the elements are [ x y z w ]).
Maybe that is the problem -- [ x y z w ] vs. [ w x y z ].
Maybe that is the problem -- [ x y z w ] vs. [ w x y z ].
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement