Find a 3D vector given the angles of the axes and a magnitude

6.9k Views Asked by At

I would like to know how one would find a point from the angles of three axes and a magnitude. I know how to do this in 2D: $(\cosΘ * m, \sin(Θ) * m)$. However, I would like to know how this would be computed in 3D with three angles (not two).

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

The angles from the three axes in 3D satisfy the equation $$\cos^2(\alpha)+\cos^2(\beta)+\cos^2(\gamma)=1$$ Proof. Let $x=(a,b,c)$ and $i,j,k$ be the standard unit vectors. We have $$\cos(\alpha)=\frac{x\cdot i}{||x||\hspace{1mm}||i||}=\frac{a}{||x||}$$ and similarly for the other two variables. Thus $$\cos^2(\alpha)+\cos^2(\beta)+\cos^2(\gamma)=\frac{1}{||x||^2}\left(a^2+b^2+c^2\right)=1$$

You cannot, in general, specify three angles because no such point would exist. With two angles, you could use the convention of "spherical coordinates" which would yield (depending on your conventions) something like $$\rho\bigg(\sin(\phi)\cos(\theta),\sin(\phi)\sin(\theta),\cos(\phi)\bigg)$$