 About Store Forum Documentation Contact   Determination of the angle of rotation matrices Author Message
Babulesnik Member

 Post: #1 Determination of the angle of rotation matrices I need to transfer over the network angles on the axes x, y, z. If I turn the matrix along the x axis and check the result Code: ItemsBowling.matrix(ItemsBowling.matrix().setRotateX(PI_4)); ... D.text(0,0,S+ItemsBowling.absElm(4).matrix().angles().x); The result is correct = 0.785 But if you increment the degree Code: ItemsBowling.matrix(ItemsBowling.matrix().setRotateX(PI)); I get a strange result = -0.000 How to find the angles of rotation matrix ?
01-04-2012 08:50 PM
Babulesnik Member

 Post: #2 RE: Determination of the angle of rotation matrices If I use the Code: ItemsBowling.absElm(4).matrix().axisAngle(ItemsBowling.absElm(4).matrix().orn().​x) result to 180 degrees the angle is correct, if the angle is greater than 180 degrees countdown( for example: ItemsBowling.matrix(ItemsBowling.matrix().setRotateX(PI)); result = 3.142 - good ! ItemsBowling.matrix(ItemsBowling.matrix().setRotateX(PI+PI_6)); result = 2.618 - badly ((
01-06-2012 07:40 PM
Driklyn Member

 Post: #3 RE: Determination of the angle of rotation matrices That's the nature of Matrices. I'm sure the reason for this is somewhere on this page. You should probably just keep a Flt for storing the angle, so it doesn't countdown and you can go beyond -PI_2 to +PI_2 range. Quaternions may be another option. I may try to elaborate further later, but I gotta go right now. (This post was last modified: 01-07-2012 01:22 AM by Driklyn.)
01-07-2012 01:21 AM
Babulesnik Member

 Post: #4 RE: Determination of the angle of rotation matrices When I get the angles ItemsBowling  Code: Vec angles = ItemsBowling.matrix().angles(); And turn the ItemsBowling  on these corners, I get an incorrect turn Code: ItemsBowling.matrix(ItemsBowling.matrix().rotateXY(angles.x,angles.y).rotateZ(angles.z)); Here is the code for the example Code: if(Kb.bp(KB_R))       {           static Flt x;           x+=0.1;           ItemsBowling.matrix(ItemsBowling.matrix().setRotateX(x));           Vec angles = ItemsBowling.matrix().angles();           Vec pos = ItemsBowling.pos();           ItemsBowling.matrix(ItemsBowling.matrix().rotateXY(angles.x,angles.y).rotateZ(angles.z));           ItemsBowling.pos(pos); How to rotate an object at the angles x,y,z of another object? I need to pass these values ​​on the network. (This post was last modified: 01-26-2012 05:39 PM by Babulesnik.)
01-26-2012 05:37 PM
Babulesnik Member

 Post: #5 RE: Determination of the angle of rotation matrices Please,anyone help me solve this problem
01-28-2012 12:39 PM
 « Next Oldest | Next Newest » 