A is the distance between the left sprite and the lens. B is the distance between the right one and the lens. F is the focus of the lens, and each black point implies where the focus point is. R is the ratio. You can control this program by changing "A."
Since a couple of years, I've wanted to imply the formula of physic on computer. The mechanics of lens has been, of course, included. This, my intense desire achieved by Scratch.