In the attached zip file (which can be downloaded from the last page of this article) are three lens file: a singlet, doublet and 5-element eyepiece design. These lenses are not intended to be the best possible design: in fact the first two are deliberately poor lenses just to demonstrate this feature!

Here is the source bitmap imaged through the singlet lens:

imaged through a singlet lens

This image was produced using 10 rays/pixel, and ran in 5 seconds on a Pentium-M 1.6 GHz laptop. Increasing the number of rays to 100/pixel gave the following result in about 40 seconds:



You can see clearly the distortion at the edges of the image and the vignetting which causes the image to darken at the edges. Field curvature and astigmatism cause the focal quality to drop off very quickly as we move away from the center of the image. Moving to the doublet lens, and tracing 100 rays/pixel gives us the following, also in about 40 seconds:

doublet

Some of the detail in the center is better resolved, but the design is clearly still dominated by distortion and field curvature. It would be hard to convince a customer that the extra cost of the doublet was justified by the improved performance!

Moving to the five-element eyepiece, which is significantly better optimized, we get:



This is a clearly better result. The distortion is gone (some higher order distortion can still be seen on the higher-resolution images shown later), and the field curvature is gone. The lady in the bottom right hand corner can be clearly seen instead of just being a smudge.

This lens uses 5 elements and requires ray-aiming turned on, and so this took around 5 minutes to trace on the same laptop as the previous scenes. So, moving to my 2-CPU workstation (which has two real Pentium 4 processors plus hyperthreading, so it looks like a 4-CPU machine), I set the GBIA to 1000 rays/pixel and obtained this in about 20 minutes:


Remember that ZEMAX is very well multi-threaded, which means that it can trace one group of rays on one processor, and another group on another. This makes great use of today's multiple-CPU and multiple-core machines. See this article for more details.

This image is virtually indistinguishable from the original image. However, this is a 640x480 pixel image displayed in a much smaller window. Here is the full jpg file saved automatically by the GBIA feature:



Remember that this is a ray-tracing result and is not the original image! If this is printed out on good quality photo-paper it gives a photo-realistic impression of the real system performance. In fact, the differences between it and the original bitmap are due to the detector resolution more than the optics themselves, so this output really does represent what this detector sees.