# Acquire gradient data of a surface from deflection measurement

In the figure above, a laser beam with source at point $$I$$ falls on a surface (DUT) at point $$P$$ and gets reflected. The reflected ray falls on the center of camera at point $$R$$. From the figure it is also clear that when the reflected beam hits the center of the camera, the slope at $$P$$ is zero.

If the DUT moves to the right (Laser, Camera are both stationay), the direction of the normal vector changes (moves to the left) and hence the point $$R$$ on the camera shifts to the left (along positive $$x-$$Axis in Kameras frame of reference). For simplicity the $$y-$$component can be ignored.

What is the computationally most economical way to determine the slope at point $$P$$ by measuring the deflection of point $$R$$ in the camera? Assume that the surface (DUT) is a parabola which is open downwards.

The reflection vector $$\vec{r}$$ from planar DUT (in the figure below) is given by:

$$\vec{r} = \vec{i} - 2 \vec{i}\cdot \vec{n} \label{reflektion}\tag{1}$$

In Eq. \eqref{reflektion}, $$\cdot$$ denotes the scalar product. I know how to determine the point of intersection between a line and a line or a plane. Since we dont have a line but a curve with varying slope, how can the slope and the normal vector at point $$P$$ be related to one another when the DUT is shifted along the $$z-$$Axis incrementally (from DUTs frame of reference)? $$\begin{equation} \phi\boldsymbol{=}\theta\boldsymbol{-}\theta' \tag{01}\label{01} \end{equation}$$
$$\begin{equation} \theta\boldsymbol{=}\dfrac{\;\pi\;}{2}\boldsymbol{-}\psi\boldsymbol{=}\dfrac{\;\pi\;}{2}\boldsymbol{-}\left(\phi\boldsymbol{+}\rho\right) \tag{02}\label{02} \end{equation}$$
$$\begin{equation} \theta'\boldsymbol{=}\omega\boldsymbol{-}\rho \tag{03}\label{03} \end{equation}$$
From \eqref{01},\eqref{02} and \eqref{03} $$\:\boldsymbol{=\!=\!\Longrightarrow}$$
$$\begin{equation} \boxed{\: \phi\boldsymbol{=}\dfrac{\;\pi\;}{4}\boldsymbol{-}\dfrac{\;\omega\;}{2}\:\vphantom{\dfrac{\tfrac{a}{b}}{\tfrac{a}{b}}}} \tag{04}\label{04} \end{equation}$$