# find coordinates from known angles and length in 3d

Suppose I have 3 vectors with length a,b,and c. They are oriented in 3D space such that the angles between the three vectors are $\alpha$, $\beta$, and $\gamma$ (suppose all less than 90 degrees).

If I set the vectors with length a and b on the x-y plane with angel $\alpha$ between them (set the vector with length a to be along x-axis), I am able to find the coordinates of the first two vectors. But then I run into trouble when I try to find the coordinates of the third vector based on its length c, and it's angles with the other two vectors $\beta$, and $\gamma$.

Can someone help me out? Thank you.

Call the corresponding unit vectors $u, v, w$, and say $u = (1,0,0)$ and $v = (\cos \alpha,\sin\alpha,0)$. (That is, $u$ is on the positive $x$ axis and $v$ is in the half-plane $y \geq 0$ of the $xy$-plane.) Further assume that $w$ is the half-space $z \geq 0$.
Let $w = (x,y,z)$. We have $$\cos \beta = u \cdot w = x, \qquad \cos \gamma = v \cdot w = x\cos \alpha+ y \sin\alpha.$$
Solving for $y$, we find $y = (\cos \gamma - \cos \alpha \cos \beta)/\sin \alpha$. To find $z$, we use the relation $x^2 + y^2 + z^2 = 1$. This yields $$z = \frac{1}{\sin \alpha}(1-\cos^2 \alpha - \cos^2 \beta-\cos^2 \gamma + 2\cos\alpha\cos \beta\cos \gamma)^{1/2}.$$
Now your vectors are $au, bv, cw$.
Hint generate three equations . 2 with dot products with vectors with length $a,b$ as you know the one vector its magnitude and $\theta$ you will get two simultaneous equations with three variablesby assuming the third vectielrs as $xi+yj+zk$ and the third condition is $\sqrt{x^2+y^2+z^2}=c$ thats all solve them get values and thats the third vector.