The Frugal Gourmet 816 Report post Posted October 7, 2003 Quick Question: I have a certain vector and certain rotation matrix. I want to determine the angle an object is rotated around that particular vector. How do I do it? Thanks in advance. 0 Share this post Link to post Share on other sites

SonOfNed 122 Report post Posted October 7, 2003 If u have 2 vectors, angle between them can be worked out via dot product:(Where a & b are vectores)a dot b = |a||b|cos gwhere g is the angle between themthats a good starting point...(carteasient equation is: x1x2 + y1y2 + z1z2 = |a| |b| cos gwhere x1 is x component of vector a and x2 is x component of vector b etc...)(I assume u can work out a vector to describe you objcets new and old position relative to some point...)---------------- Does it matter? Even if it does matter, does it matter that it matters? 0 Share this post Link to post Share on other sites

The Frugal Gourmet 816 Report post Posted October 7, 2003 Hmm.. thanks for responding. I''m not sure I understand, though. Let''s say I have a space ship traveling in a certain vector. Let''s assume the space ship is rotated AROUND that vector arbitrarily (maybe 45 degrees or something).I have the vector and the current rotation matrix, but I actually want to find out what that angle the ship is "rolled" around that vector (conceptually). For some reason, I can''t figure that out. 0 Share this post Link to post Share on other sites

The Frugal Gourmet 816 Report post Posted October 7, 2003 Actually, a more simple way of putting it...I guess what I''m saying is: Can I convert from a euler angle representation (yaw, pitch, roll) to an axis/angle representation? If so, what is the formula? 0 Share this post Link to post Share on other sites

SonOfNed 122 Report post Posted October 11, 2003 One way I can think about doing it... (its a bit screwie though):Before the role, find the normal the the plane you are traveling along, after the roll, do that again, dot the two to find the angle between them...OR:If you know the pitch, yaw & roll, the angel you rotate around is the roll...(correct me if i''m wrong..)i.e. your direction vector is define only by pitch and yaw(2 angles needed for any direction in 3d space)The roll is your rotation about the direction vector...(if that makes any sense at all...)----------- Does it matter? Even if it does matter, does it matter that it matters? 0 Share this post Link to post Share on other sites

The Frugal Gourmet 816 Report post Posted October 23, 2003 I realize this is a belated response, but thank you very much! 0 Share this post Link to post Share on other sites