Diverging lenses are - similar to converging lenses - composed of two sphere segments. In addition, there is a cylindrical 'envelope'. The parameters are set in the following dialog:
The meaning of the parameters is explained using the following construction of the final lens:
1.
Start with a cylinder. It has a radius given by Radius of lens and a thickness given by Thickness. The cylinder is centered around the vector Location. Its symmetriy axis is given by the direction Orientation:
2.
Now add on the left side a sphere segment. The center of the sphere is on the symmetry axis of the cylinder, the radius is given by Radius 1. The distance of the sphere center to the left side of the cylinder is given by Radius 1 as well - the sphere segment just touches the cylinder:
3.
Finally add the sphere segment on the right:
Note that Radius 1 and Radius 2 must always be larger than Radius of lens.
If you choose a large value of thickness the lens becomes an optical fiber:
All three surfaces (the two sphere segmenst as well as the cylinder) are covered with the same interface. The definition of that interface is the same as explained for rectangles.