Archived

This topic is now archived and is closed to further replies.

The Frugal Gourmet

Finding Angle Around Vector

Recommended Posts

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 g

where g is the angle between them

thats a good starting point...

(carteasient equation is: x1x2 + y1y2 + z1z2 = |a| |b| cos g
where 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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites