Calculate normals or surfaces in 3D using angles

3dangletrigonometryvectors

For example in 2D space:

Image

It is possible to calculate unit normal, $\vec{n}$, using $\theta$ and a bit of the unit-circle application: $$\vec{n} = (\sin{\theta}, -\cos{\theta})$$

I want to know is the same rules apply for 3D:

image

If it looks confusing:

  • Plane a has no elevation
  • Plane b is elevated on plane a by $\theta$
  • $\phi$ is the angle made between the x-axis and Plane a

Think about the 2D cartesian graph turning into the 3D cartesian graph above, but now the entire slope is shifted by angle of $\phi$ in the horizontal direction (from the x-axis).

Now, to calculate $\vec{n}$ in 3D graph, do the same rules apply as the 2D graph (ie, $$\vec{n} = (\sin{\theta}, -\cos{\theta}, z)$$, and if so, how would we calculate z? Basically, I want to calculate the normal of plane b using its angle of inclination. Any help is appreciated!

EDIT:

Continuing on @user 's answer:

image

I know $\angle X$ (Angle made with the y-axis / its rotation around the x-axis)

I know $\angle Y$ (Angle made with the x-axis / its rotation around the y-axis)

I know $\angle Z = \theta$ (Angle made with the x-axis / its rotation around the z-axis)

Is it now possible to calculate $\phi$? … so that I can calculate the normal.

Best Answer

Given a normal vector in the space $N=(A,B,C)$ the first step is to make this vector unitary by

$$n=\frac{N}{|N|}=\left(\frac{A}{\sqrt{A^2+B^2+C^2}},\frac{B}{\sqrt{A^2+B^2+C^2}},\frac{C}{\sqrt{A^2+B^2+C^2}}\right)=(a,b,c)$$

then by spherical coordinates, beeing $r=|n|=1$, we have

  • $a=\cos \theta \sin \phi$
  • $b=\sin \theta \sin \phi$
  • $c=\cos \phi$

with

  • $\phi = \arccos c$
  • $\theta = \arctan \frac a b$ (adjusting properly for the qudrant and in case $b=0$; see also atan2 function)

enter image description here (credit Wikipedia)


Edit

What you have are the angles for direction cosines, therefore with your symbols

  • $a= \cos y$
  • $b=\cos x$
Related Question