How to calculate the rotation of a vector?

499 Views Asked by At

So, let's say I have vector $\vec{ab}$ and vector $\vec{ac}$. How do I calculate the amount of rotation from $b$ to $c$?

Note, this is in a 3D space, of course...

2

There are 2 best solutions below

7
On BEST ANSWER

Use the formula:

$\cos \theta = \frac{\vec {ab}\cdot \vec{ac}}{|\vec{ab}||\vec{ac}|}$

where $\theta$ is the angle between $\vec{ab}$ and $\vec{ac}$.

2
On

Let $\,\theta\,$ be the angle between the given vectors: $\,\vec{ab}\;\text{and}\; \vec{ac}\,.$

Recall that $$\cos \theta\; = \;\left(\frac{(\vec{ab})\cdot (\vec{ac})}{|\vec{ab}||\vec{ac}|}\right)\;.$$

Solving for $\,\theta\,$ gives us: $$\theta \;= \;\cos^{-1}\left(\frac{(\vec{ab})\cdot (\vec{ac})}{|\vec{ab}||\vec{ac}|}\right)$$