So I've been working on modeling an optical system using ray tracing. I've finally gotten to the point where I am testing things however I've come across something I'm not entirely sure of. I'm casting a set of rays into an asymmetric bi-convex lens and applying Snell's law to each ray to trace them through the lens. I then calculate the expected focus using the following equation:
$$\frac{1}{f} = (n-1)\left[\frac{1}{R_1} - \frac{1}{R_2} + \frac{(n-1)d}{nR_1R_2}\right]$$
I've plotted this point, as well as the rays exiting the lens, and I'm seeing that they don't match up all the time. My rays are being cast perpendicular to a sensor that lies on the optical axis (as shown below) so they travel in parallel lines until hitting the lens. It is my understanding then that the rays should then refract through the lens, and all converge at the focus. Is that not the case? Am I misunderstanding something here, or is there some other equation for the focal point that I should be using?
I'm also confused by the fact that different ray diagrams seem to show different things, such as the following images where one shows that parallel light converges to the focal point, while another shows something completely different:
Any help would be greatly appreciated!