Archived

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

Finding Angle Around Vector

This topic is 5451 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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.

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

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)

(if that makes any sense at all...)

-----------

Does it matter? Even if it does matter, does it matter that it matters?

Share on other sites
I realize this is a belated response, but thank you very much!

1. 1
2. 2
3. 3
Rutin
16
4. 4
5. 5

• 10
• 10
• 14
• 10
• 25
• Forum Statistics

• Total Topics
632647
• Total Posts
3007640
• Who's Online (See full list)

There are no registered users currently online

×
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}