This is a full (geometrical optics) ray-tracer for calculating the trajectories of
refracted and reflected rays of light of generic surfaces. This code works on
any surface of the form $G(x,y)=0$ and any combination thereof.
For surface ensembles, AND and OR operators are implemented as soft maximum or minimum,
i.e. $G(x,y)\equiv \text{max}_\alpha\{G_i(x,y)\}$ (as in the above spherical lens models).
Sadly, I have not yet found a nice way to manipulate the lenses interactively (apart from moving them of mouse-drag).
Hopefully, I will get around to that at some point.