Rotation Matrices and Quaternions
I am having a strange problem.
I create two quaternions from euler angles, the three eulerangles used are 45, 45, and 45 (degrees) for both quaternions. I then multiply the quaternions together (the same as multipling two eqivalent rotation matrices). I then convert it back to euler angles. The resulting angles are 118.675, 27.201, 118.675 . This does not seem right? Can someone verify that this is correct? I have checked both the quaternion->Euler conversions and the Euler->Quaternion conversions and the quaternion multiplication operation, and it seems to be correct.
Is this the right answer?
-Evan
Those who dance are considered insane by those who cannot hear the music.
Sorry maybe i didn''t get the meaning , but why are you multiplying two quaternions, if you want a smooth transition beetween them , just convert from euler and interpolate beetween them
quote:
Original post by v71
Sorry maybe i didn''t get the meaning , but why are you multiplying two quaternions, if you want a smooth transition beetween them , just convert from euler and interpolate beetween them
Who said anything about interpolation? He''s obviously trying to concatenate the transformations.
Back to the problem at hand:
I have not explicitly tested your problem. But doing some aproximations I''d say they are fine. Especially since two of the angles are the same I''d trust your code.
Results like 90, 90, 90 would be definitely wrong, since the 2nd transformation starts where the first left off.
By the way:
Testing with 45 degrees has not proved very usefull to my at all.
Better to test with 0, 90, 180 and -90. Errors in the code will be visible too, but much easier to detect
cu Dreamforger
---------------------------
I may be getting older, but I refuse to grow up
I may be getting older, but I refuse to grow up
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement