Access to eBooks is limited to institutions that have purchased or currently subscribe to the SPIE eBooks program. eBooks are not available via an individual subscription. SPIE books (print and digital) may be purchased individually on SPIE.Org.

Contact your librarian to recommend SPIE eBooks for your organization.
Chapter 3:
How to Put a Lens in a Computer
To begin tracing rays with a computer, you must first enter the imaging system into the design program. There are two primary sets of information needed to set up a new optical design: the system data and the lens prescription. The system data describes how the lens will be used (e.g., object size, wavelength, aperture size), whereas the prescription consists of the shape, location, and material of the lens elements. If the image distance is not given as part of the lens prescription, then a solve, an operation that will described in Section 3.3, is often entered into the program to find the paraxial image location. There are two ways to enter the necessary data into CODE V's user interface (see the box, "CODE V's User Interface" for a description of its layout). One is the graphic user interface (GUI), which uses a series of windows, menus, and clickable buttons. The other approach is the command line interface (CLI), where all user entry is done by typing a series of commands. After a brief introduction to the GUI in this chapter, we will primarily use the CLI in the command window for the remainder of the text. As you will see from the lengthy descriptions needed to show you how to enter values using the series of windows that make up the GUI, it is much easier to use the CLI to type in a string of commands that accomplish the same purpose with very little fuss. These commands are a series of two- and three-letter strings followed by modifiers and the value of a quantity. For example, to set a thickness of value thick beyond the kth surface of a lens, you would enter THI Sk thick. We will indicate CLI commands by shading the commands as we have done here. These commands will be introduced as they are needed, but there will be no attempt to cover all of the commands that are used in CODE V. That information is available from the User Guide, the Prompting Guide, and the Reference Manual that is accessible within the program.

For brevity within this text, we will also use an abbreviated CLI nomenclature when describing a design. For example, instead of referring to "the third surface in the system," we will use S3. And the "radius of curvature of the second surface of the lens" (RDY S2 in CLI) will be abbreviated as R2. Distances between two surfaces (written in CLI as THI Sk, where "k" is the number of the surface) will be referred to as Tk. And the glass of the second medium will be abbreviated as G2. Design references will be distinguished from CLI commands, which are displayed in a sans serif typeface with a shaded background.

Online access to SPIE eBooks is limited to subscribing institutions.

Back to Top