I stumbled upon a problem when trying to explain how a spectrometer with a prism works based on geometrical optics.
I started from the basic example of image formation based on refraction as it is given in the figure below.
What I next did is to see if the distance $h_1$ depends in some way on the angle $i$ and after some calculations I got $$h_1 = h_0 \cdot \sqrt{1-\frac{1-\frac{n_2^2}{n_1^2}}{cos^2(i)}}$$
which implies that it does depend on that angle.
My problem now is related to the idea behind image formation. In order to consider something to be an image, the rays have to intersect into a point, which, based on the above formula, does not happen. Each pair of 2 rays will intersect in a different point.
I tried this online app to check this and the result checked. A caustic appears, not an image in the classical sense.
So the problem is as follows. There is no image formation in the sense that I have mentioned above. However all of us have seen that an image does indeed exist by personal experience. How can this be explained by use of geometrical optics alone?
And on the topic that interested me, that of a prism used as a spectrometer, this implies that the image changes if I change the viewing angle (since this also changes slightly the incident angle). Doesn't this affect the position of spectral lines based on the viewing angle?
EDIT
As it was requested, I went through the calculation behind the formula in order to check if I got it right. A step-by-step description follows.
$$d = h_0 \cdot tg(i) = h_i \cdot tg(r)$$
from which $h_i$ can be written as
$$h_i = h_0 \frac{sin(i) \cdot cos(r)}{sin(r) \cdot cos(i)}.$$
I replace $sin(r)$ with Snell formula which gives
$$h_i = h_0 \frac{n_2}{n_1} \cdot \frac{cos(r)}{cos(i)}.$$
Rewrite $cos(r)$ using $1=sin^2(r)+cos^2(r)$ and use Snell formula again so
$$h_i = h_0 \frac{n_2}{n_1} \cdot \frac{\sqrt{1-(\frac{n_1}{n_2} sin(i))^2}}{cos(i)}.$$
Get everything under the square root except $h_0$ which gives
$$h_i = h_0 \sqrt{\frac{(\frac{n_2}{n_1})^2-sin^2(i)}{cos^2(i)}}.$$
Change $sin(i)$ into a $cos$ as above and the initial formula is obtained
$$h_i = h_0 \sqrt{\frac{(\frac{n_2}{n_1})^2-1+cos^2(i)}{cos^2(i)}} = h_0 \sqrt{1-\frac{1-(\frac{n_2}{n_1})^2}{cos^2(i)}}.$$