TransWikia.com

Calculating angle of a 2D vector with positive y-axis

Engineering Asked on December 6, 2020

This has been a burning question that I’ve been thinking about recently.

In statics problems like the one I’ve attached here where we are asked to find the angle that the resulting vector has with the positive y-axis, do we take the angle going clockwise or counter-clockwise from the y-axis to the resulting vector?

I remember from class that we calculate the angle between the positive x-axis with a vector going counter-clockwise ‘always’ however I’m unfamiliar with the rule when it comes to finding the angle with the positive y-axis.

I would appreciate any insight on this topic.

enter image description here

Reference: Engineering Mechanics STATICS, J.L. Meriam, L.G. Kraige, 7th Edition

3 Answers

Angles in right handed coordinate systems are always measured as positive counter-clockwise.

enter image description here

With respect to x axis the angle of the vector can be easily be found with the use of atan2 (although the result is usually $[-pi, pi]$ instead of 0 to $2pi$. So in Excel you only need to do =atan2(40,-30) and you get the result in radians (-0.6435) or =ATAN2(40,-30) *180/PI() if you want it degress ($phi_x =-36.87deg$).

In this case you could use atan and you would get the same result, however the problem with atan is that it gives the same result of e.g. $langle x_0,y0rangle$ and $langle-x_0,-y0rangle$ (i.e. it cannot distinguish between 1st and 3rd quadrant and 2nd and 4th).

Regarding the angle between the y-axis you only need to subtract 90 degrees from the angle with the x-axis. i.e. for this example:

$$phi_y = -90-36.87 = -126.87 [deg]$$

Additionally, if you wanted to use atan2 for the y-axis and the vector had coordinates $vec{V} = (xV, yV)$ then in excel you'd need to use =atan2(yV, -xV). This is because you'd be expressing $vec{V}$ in terms of coordinate system which is rotated by 90 deg ccw compared to the initial one.

Regarding the second part of the answer (unit vector) the answer kamran gave is succinct and to the point.

I could only add the following. Given the unit vector $$vec{e}_V = frac{4}{5}vec{i} - frac{3}{5}vec{j}$$ you can estimate the angle with the x axis (let denote it $phi_x$)by taking the dot product of the unit vector of X with the unit vector of V and then calculating the $arccos(vec{e}_{x}cdot vec{e}_{V})$. However you will only get the magnitude and you need to check which quadrant you are in. (Similary for the y-axis $arccos(vec{e}_{y}cdot vec{e}_{V})$ ).

$$$$

Correct answer by NMech on December 6, 2020

the magnitude of the vector is

$|vec{V}|=sqrt{40^2+30^2}=50$

The unit vectot u along the vector is the vector divided by its magnitude:

$vec{u}=frac{vec{v}}{|v|}=1/ |vec{v}| *vec{v}= 1/50*vec{v} $

$vec{u}= 1/50*langle40, -30rangle$

And the angle $theta with X axis =arctan(-30/40)=-36.86$

Edit

angle with Y axis $ -36.86-90=-126.86^circ $

Answered by kamran on December 6, 2020

By definition of dot product: $$ vec{a} . vec{b} = |vec{a}| |vec{b}| cos (theta) $$

Where $theta$ is the angle between the two vectors $vec{a}$ and $vec{b}$.

To find angle between your vector and +ve x-axis, set $vec{a} = (40, -30)$, $vec{b} = vec{i} = (1, 0)$ such that $|vec{i}| = 1$

$$ theta = cos^{-1}( frac{(40, -30) . (1, 0)}{50 * 1 } ) = -36.86$$

You can calculate the angle between the vector and the +ve y-axis by setting $vec{b} = vec{j} = (0, 1)$, which you can easily calculate as shown above.

Answered by Algo on December 6, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP