MHB Left or Right Angles ( + or - ) of adjoining vectors

  • Thread starter Thread starter BrentK
  • Start date Start date
  • Tags Tags
    Angles Vectors
BrentK
Messages
20
Reaction score
0
Hi there,
I have another one for you (Blush)

How can I efficiently determine if the angle between 2 vectors is positive or negative...
Take a look at this example drawing:

View attachment 8685

Known are the xy coordinates of 2 adjoining vectors, (I also have calcullated the 360 deg angle relative to the x-axis if that is a help ... shown with grey arrows on the drawing)
In the drawing the leading vector (Red) as adjoined to either a vector giving a positive or (left) angle, or a vector in the negative direction (right) angle.

I need to be able to calculate if the adjoining vector is a positive or negative angle in relation to the leading vector... sounds simple right? and proabably is, but I just don't seem to be able to get it right with all different vector direction possibilities

The formula should calculate all possibilites of two adjoining vectors, so e.g. could also be heading in the opposite direction where x1y1 is less than x0y0... hope you understand what i mean :)

Look forward to any help yo may be able to provide.
Many thanks, This forum has been a great help to me!
 

Attachments

  • Unbenannt.JPG
    Unbenannt.JPG
    9.9 KB · Views: 121
Mathematics news on Phys.org
Start with the red vector, which is $\begin{bmatrix}x_1-x_0 \\ y_1-y_0\end{bmatrix}$. If you rotate it "to the left" (in other words, anticlockwise) by $90^\circ$ then it becomes $\begin{bmatrix}y_0-y_1 \\x_1-x_0\end{bmatrix}$. You want to know whether the inner product of that vector with the blue vector $\begin{bmatrix}x_2-x_1 \\ y_2-y_1\end{bmatrix}$ is positive. So the condition you need is $$x_0(y_1-y_2) + x_1(y_2-y_0) + x_2(y_0-y_1) > 0 \quad \text{for "left",}$$ $$x_0(y_1-y_2) + x_1(y_2-y_0) + x_2(y_0-y_1) < 0 \quad \text{for "right".}$$
 
Thanks again Oplag!
That worked fine...
Now I have found a new challenge... If you are willing,I'd appreciate you take a look at my new post.

I really appreciate your help. I'm not that great at Maths...I'm trying hard and learning, but this task is very hard for me! Without you and the help of others on this forum, I'd be totaly lost!
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.
Back
Top