| THEORY FORMULAE |
Converging or positive spherical lens are thicker at the center than at the rim, and will converge a beam of parallel light to a real focus. Diverging or negative lens are thinner at the center and diverge light to a virtual focus.
For a lens of a known material and ground to a certain shape, it is possible to calculate the focal point in a given medium as well as its power by the lens maker’s equations:
where
     r1 = radius of curvature of the first surface (+ve if curvature center is to the right of surface, -ve if to the left)
     r2 = radius of curvature of the second surface (+ve if curvature center is to the right of surface, -ve if to the left)
     n1 = refractive index of lens material, e.g. glass=1.5, ruby=1.77, iodine crystal=3.34
     n2 = refractive index of ambient medium, e.g. vacuum=1.0, air=1.00029, water=1.333
     f = focal point (+ve if converging, -ve if diverging)
     P = lens power in diopters (m-1)
Turning the lens around 180 deg has no effect on its focal length or power.
◊ Use link
EXAMPLE Of Input/Output
to demo data entry expectations and results; you may edit & use it as starting point