This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Some problems about quaternion slerp

Tags: None
(comma "," separated)
User avatar
ccjn
Registered Member
Posts
4
Karma
0
OS
Hello every one!

I'm pretty new to Eigen and I'v encountered some problems about quaternion slerp.
I tried to convert Matrix3d to Quarterniond and then do the reverse ,but two matrix aren't equal!
Here's my convertion code:
Code: Select all
Matrix3d Rt = Matrix3d::Random(3,3);
Eigen::Quaterniond Q1(Rt);
Eigen::Matrix<double,3,3> Rrr = Q1.toRotationMatrix();


Then I cout those two matrix and they are not equal
Is there anything wrong in my code ?
Please Help!

Best wishes
ccjn
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
This is because Rt is a random matrix and thus it does not represent a rotation but in this case a general linear transformation which includes rotation, non-uniform scaling, and shearing. In this case the rotation represented by the quaternion is undefined.
User avatar
ccjn
Registered Member
Posts
4
Karma
0
OS
ggael wrote:This is because Rt is a random matrix and thus it does not represent a rotation but in this case a general linear transformation which includes rotation, non-uniform scaling, and shearing. In this case the rotation represented by the quaternion is undefined.

Thank you very much ! I didn't get a clear understanding about rotation Matrix :P


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]