Rotating a vector around another vector

520 Views Asked by At

A drawing of what I'd like to get

So given a coordinate system, that has no negative values, the $(0;0)$ is on the upper-left corner, $(X(\max);Y(\max))$ is on the lower-right. I have a $v(v_1;v_2)$ vector, where I know the exact value of $v_1$ and $v_2$. I also know the magnitude of the $u$ vector, and it's angle to the $v$ vector.

How can I calculate the $(u_1;u_2)$ coordinates? I can rotate it in a Cartesian system, but not in this one.

1

There are 1 best solutions below

0
On

You didn't say in which direction $u$ is rotated compared to $v$ (clockwise or counterclockwise). Let's say it's counterclockwise, then you calculate $u$ in the following way:

$$ w= \left( {\matrix{ {w_1} \cr {w_2} \cr } } \right) = \left( {\matrix{ {cos(\theta)} & {-sin(-\theta)} \cr {sin(-\theta)} & {cos(\theta)} \cr } } \right) \left( {\matrix{ {v_1} \cr {v_2} \cr } } \right) $$

$$ u=\left( {\matrix{ {u_1} \cr {u_2} \cr } } \right)=\frac{w}{||w||}||u|| $$ If it's clockwise just use the minus of the angle ($\theta=-\theta$).

I don't think all the axises directions that you mentioned are relevant for solving the problem.