# 3D Vector defined by 3 angles trigonometry components

What I'm looking for is the trigonomery equations to calculate the x, y and z components of a 3D vector. What I mean:

The counterpart formulas for a 2D vector defined by 1 angle:

$$x = \cos(\alpha)$$

$$z = \sin(\alpha)$$

The counterpart for a 3D vector defined by 2 angles:

$$x = \cos(\alpha) \cos(\beta)$$

$$z = \sin(\alpha) \cos(\beta)$$

$$y = \sin(\beta)$$

So what I need is something along the lines of:

$$x = \cos(\alpha) \cos(\beta) f(\gamma)$$

$$z = \sin(\alpha) \cos(\beta) g(\gamma)$$

$$y = \sin(\beta) h(\gamma)$$

where $$f(\gamma),g(\gamma),h(\gamma)$$ are some functions of $$\gamma$$.

• any 3-D vector is defined by its magnitude $r$ its angle with $z$ axis and its angle with the $x-y$ plane. May 8, 2015 at 19:28
You can use the three angles between the vector $\mathbf{v}$ and the coordiante axes, defined by the direction cosines:
$$\cos \alpha=\dfrac{\langle \mathbf{v},\mathbf{i} \rangle}{|\mathbf{v}|}$$
$$\cos \beta=\dfrac{\langle \mathbf{v},\mathbf{j} \rangle}{|\mathbf{v}|}$$
$$\cos \gamma=\dfrac{\langle \mathbf{v},\mathbf{k} \rangle}{|\mathbf{v}|}$$ so that you have: $$\mathbf{v}=\begin{bmatrix}x\\y\\z \end {bmatrix}= |\mathbf{v}|\begin{bmatrix}\cos \alpha\\\cos \beta\\\cos \gamma \end {bmatrix}$$