\frac{x^2}{a^2}+\frac{y^2}{b^2}=1 is the equation for the shape of the lens (equestion of Ellipse).
Snell's law is used to calculate the ray refraction when light enter into lens and get out of the lens.
You should be able to find it in the code.

am i right to say that this simulation is to show us that the thicker the lens, the shorter the focal length?

Yes. The focal length getting shorter when lens is getting thicker.
When the lens is too thick or when the ray is too far from the axis, there might be a single focual point any more.
Please check out [url=http://Lens (thick lens) and Mirror]Lens (thick lens) and Mirror[/url].