Get Vector between unit vectors at certain angle in 3d

39 Views Asked by At

If I have two 3d unit vectors, how can I get a third 3d unit vector, that is on the same plane as the other two, at an angle of $x$ degrees from the first Vector?

For 2 dimensions, this is simple, because the requirement, that all three vectors have to be on a plane is always satisfied, but I can't figure it out for 3d.

2

There are 2 best solutions below

0
On BEST ANSWER

Let consider $\vec v_1$ and $\vec v_2$, firstly we need to othogonalize $\vec v_2$ with respect to $\vec v_1$ that is

$$\vec u_2 = \frac{\vec v_2- (\vec v_2\cdot \vec v_1)\vec v_1}{|\vec v_2- (\vec v_2\cdot \vec v_1)\vec v_1|}$$

then we have

$$\vec v_3=(\cos x) \vec v_1+(\sin x) \vec u_2 $$

such that $\vec v_3 \cdot \vec v_1 =\cos x$.

0
On

As the new vector is on the same plane as the two vectors, we can take it as some $v = \frac{v_1 + \lambda v_2}{\Vert v_1 + \lambda v_2\Vert}$, then we need to solve this equation for lambda using dot product $v\cdot v_1 = cos (x)$. Substituting this value in value of $v$ would yield the vector