Normal Vector of plane for Rotation I reading a code where Normal vector to a plane is given. then a,b,c are taken (what I guess is direction ratio values).
a=norm_vec(1); b=norm_vec(2); c=norm_vec(3);

Now I cannot understand How Author has mapped available (a,b,c) into the below.
cos(β)=sqrt((a^2+c^2)/(a^2+b^2+c^2));
sin(β)=b/sqrt(a^2+b^2+c^2);

Later on These TWO values are used for performing rotation along X axis.
sin(α)=a/sqrt(a^2+c^2);
cos(α)=c/sqrt(a^2+c^2);

Later on These TWO values are used for performing rotation along Y axis.
I will appreciate if anyone can explain as Im very stressed. I tried to relate with direction cosines, but i get very much confused. Thank You very much.
 A: The direction of the plane is described as two rotations about the X and Y axis. The details I think are as follows:
$$\left. \frac{(a,b,c)}{|(a,b,c)|} = {\rm RY}(\alpha) {\rm RX}(-\beta) \hat{k} \right\} $$
$$ \begin{align}
\frac{a}{\sqrt{a^2+b^2+c^2}} &= \sin(\alpha)\cos(\beta) \\ 
  \frac{b}{\sqrt{a^2+b^2+c^2}} &= \sin(\beta) \\
  \frac{c}{\sqrt{a^2+b^2+c^2}}&= \cos(\alpha)\cos(\beta) \end{align}$$
The above is solved for $\sin(\beta)$ from the 2nd equation, and for $\cos(\beta)$ by squaring and adding the 1st and 3rd equation. 
$$ \frac{a^2+b^2}{a^2+b^2+c^2} = \cos^2(\beta) $$
Then $\cos(\beta)$ is substituted into the 1st and 3rd equation to be solved for $\sin(\alpha)$ and $\cos(\alpha)$
What does it mean?
It means that starting from the z-axis ($\hat{k}$) rotate by $\alpha$ about the y-axis, and then by $-\beta$ about the rotated x-axis to arrive at the orientation of the plane.
A: Here's a diagram:

The right triangles with the indicated interior angles correspond to the ratios in question.
