The angle of incidence can be found using the formula $\cos i = \frac{\mathbf{A} \cdot \mathbf{k}}{|\mathbf{A}|}$, where $\mathbf{A}$ is the incident ray, $\mathbf{k}$ is the unit vector in the z-direction, and $|\mathbf{A}|$ is the magnitude of $\mathbf{A}$.
Show more…