Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2010-03-17 05:29:46

mrfandus
Member
Registered: 2010-03-17
Posts: 2

Angle between two vectors in the plane..

Hi..

This is my first post ever in this forum, so hello to everyone wave

I'm trying to create a game where I use vectors to define the directions.

I use the formula provided in the bottom of this illustration that I've created:
http://i40.tinypic.com/sor9me.jpg

I use the formula to find the angle between the two vectors, but the problem is that it always finds the smallest angle between the vectors.

So the angle between v1 and v2 is 45degress
and the angle between v1 and v3 is also 45 degress.

Is there any way to make the angle between v1 and v2 to -45degress or just make it to 360-45degress.

I have tried something with the dotproduct, but I couldn't figure it out.

I really hope that you have any suggestions smile

Thansk for you time and help!

Regards Fandus

Offline

#2 2010-03-17 06:50:35

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: Angle between two vectors in the plane..

mrfandus wrote:

sor9me.jpg

Do you mean you want angles rotated clockwise to be negative and those rotated counterclockwise to be positive? Then try this formula:

This is computed using the cross product rather than the dot product. In your example (following your style in taking the downward y-direction as positive):

And the cross-product formula gives

While

and the angle with the first vector is

Welcome to the forum, mrfandus. wave

Last edited by JaneFairfax (2010-03-17 13:00:54)

Offline

#3 2010-03-17 10:47:52

mrfandus
Member
Registered: 2010-03-17
Posts: 2

Re: Angle between two vectors in the plane..

Thanks alot for your help. It solved my problem! big_smile

Offline

Board footer

Powered by FluxBB