I have a specific problem and I was hoping you could help me. I need to find at which position a height of the object is projected onto a surface.
I have small glass lens at the end of a glass rectangle. Inside this glass rectangle is a thin picture of a circle with stripes in it. This stripes are 0.005mm in height and between each stripe there is a 0.05mm gap. The light rays (red) are coming at a certain angle from the left to each stripe and exit the lens at a different angle and then hit the surface (see pictures below).
The lens and the glass have the same refracting index. Distance between picture and exit lens is S, the focal length of the lens is f. Distance between the lens ant the surface is L, height from the lens to the surface is h. $\varphi$ is the angle between L and the surface, $\delta$ is the half angle of the light cone (blue).
This is the transfer matrix that I used:
$\begin{bmatrix}x'\\\alpha' \end{bmatrix} = \begin{bmatrix}1 & L\\0 & 1\end{bmatrix} \begin{bmatrix}1 & 0\\-\frac{1}{f} & 1\end{bmatrix} \begin{bmatrix}1 & 0\\0 & \frac{n_{glass}}{n_{air}}\end{bmatrix} \begin{bmatrix}1 & S\\0 & 1\end{bmatrix} \begin{bmatrix}x\\\alpha \end{bmatrix}$
For small angles: $\alpha = \frac{x}{S}$ and $n_{air} = 1$.
I have $x$ in the range from 0 to 0.78 with a step of 0.005
When I do the math I get this equations: $$x' = x \left(2 + L \left(\frac{n_{glass}}{S} - \frac{2}{f}\right)\right)$$ $$\alpha' = x \left(\frac{n_{glass}}{S} - \frac{2}{f}\right)$$
The first equation is a linear one, which cannot be correct for the projection. The second one are angles and with some trigonometry I get this equation:
$$x' = \frac{\sin(\delta + \varphi - \alpha')}{\sin(\alpha')}$$
This equation is close to the solution (the general shape is the same), but when I do the actual simulations, I get different values. Just to show you an example (fitting a polynomial curve of power 3):
My theory: $x' = 10587x^3 - 3745.3x^2 + 1649.5x - 33.44$
Simulations: $x' = 6208x^3 - 2259.5x^2 + 1159x - 21.381$
Can anybody tell me why such a difference, or another method to make this work?

