Zheng et al. Vol. 27, No. 8/August 2010/J. Opt. Soc. Am. A 1791

Analytic-domain design with proximate tracing

Nan Zheng,1 Nathan Hagen,2,* and David J. Brady2,3 1Department of Physics, Duke University, Durham, North Carolina 27708, USA 2Department of Electrical and Computer Engineering, Fitzpatrick Institute for Photonics, Duke University, Durham, North Carolina 27708, USA 3E-mail: [email protected] *Corresponding author: [email protected]

Received February 17, 2010; revised June 3, 2010; accepted June 5, 2010; posted June 7, 2010 (Doc. ID 124169); published July 14, 2010 We have developed an alternative approach to optical design which operates in the analytical domain so that an optical designer works directly with rays as analytical functions of system parameters rather than as dis- cretely sampled polylines. This is made possible by a generalization of the proximate technique which obtains the analytical dependence of the rays at the image surface (and ray path lengths at the exit pupil) on each system parameter. The resulting method provides an alternative direction from which to ap- proach system optimization and supplies information which is not typically available to the system designer. In addition, we have further expanded the procedure to allow asymmetric systems and arbitrary order of approxi- mation, and have illustrated the performance of the method through three lens design examples. © 2010 Op- tical Society of America OCIS codes: 080.2740, 080.6755, 220.3620.

1. INTRODUCTION generalization which is made possible through the power The design of an optical system typically proceeds with of modern computer algebra systems [9] to manipulate the use of a modern computer program for performing ex- large analytical equations. act ray tracing. The user first models the optical layout In its original form, proximate ray tracing involves first and constructs a merit function, after which the program analytically calculating the formulas for transfer and re- uses ray trace data to minimize the merit function by ad- fraction at each polynomial order of approximation. A ray justing the system parameters. The most common optimi- trace then involves calculating the numerical values of zation algorithm used is damped least-squares [1], which the ray-surface intersection point at each surface, at each is fast but has the drawback that it is limited to finding order of approximation. The procedure was thus devel- only local minima. If the starting optical configuration is oped as an efficient method of numerically calculating far enough from the global minimum, and the merit func- higher-order aberration coefficients, and it requires trac- tion is complicated enough to possess a number of local ing only a small set of special rays to obtain the aberra- minima (as in almost all cases of interest), then the tion coefficient values. The generalization we present chance of converging on the global solution quickly ap- here extends proximate ray tracing’s analytical approach proaches zero. Global optimization techniques [2] such as to the entire design process, without numerical substitu- simulated annealing [3] or genetic algorithms [4] can of tion. Thus, rather than obtaining analytical formulas for course get around this problem, but require extensive each individual and transfer step in the trace, computational resources [5]. While it is possible to mini- we obtain a single formula for the rays at the image plane mize the computational effort needed by providing the al- (and exit pupil). We can thus obtain the aberration coeffi- gorithm with a starting configuration which is as close as cients in analytical form, in which the functional depen- possible to the global solution, thereby minimizing the dence of the lens merit function on the system parameters search space, the method for doing this relies heavily on is retained. The aim is to show that with the aid of mod- the intuition of the designer and on tools developed in ern computer algebra systems, optical design problems classical aberration theory (such as aberration cancella- that are currently performed numerically can also be tion in symmetric systems). done in the analytical domain, and that this can have sig- We present what we believe to be a new design tool nificant advantages for understanding the design prob- which approaches the problem from a different direction, lem. and thus may be helpful in situations where traditional A closely related approach for analytical ray tracing tools get stuck: a ray tracing engine that provides the ex- was taken by Kondo and Takeuchi [10] through the use of pression for the rays, to any desired polynomial order of matrices and the selection of a proper vector basis for approximation, as an analytical function of the system pa- modeling the nonlinear effects present in ray tracing (up rameters. The approach is a generalization of the proxi- to the desired order of approximation). While similar to mate ray tracing method developed by Hopkins [6–8]—a the approach presented here, it lacks the conceptual sim-

1084-7529/10/081791-12/$15.00 © 2010 Optical Society of America 1792 J. Opt. Soc. Am. A/Vol. 27, No. 8/August 2010 Zheng et al. plicity of proximate ray tracing, and thus we feel that it is taken to be the optical axis, and multiplying w by the re- a much more cumbersome tool to work with. That is, for fractive index n of the medium gives the ray optical path many optical engineers, the concept of equating terms of length. The refraction equations can be written as [[17], p. like order in the Taylor expansion of a nonlinear equation 133] is a much more familiar process than that of constructing ͑ ϫ ͒ Ј͑ Ј ϫ ͒ ͑ ͒ a nonorthogonal vector basis in which to represent a non- n c N = n c N , 2 linear transformation. This conceptual simplicity becomes where N=͑Nx ,Ny ,Nz͒ is the normal vector of the surface, important for understanding what to do with the large set and of polynomial terms generated by either approach. ١f͑r͒, ͑3͒ = Kondo and Takeuchi’s matrix approach was modified by N Lakshminarayanam and Varadharajan [11], and also by ͑ ͒ Almeida [12], and adapted for use in a computer algebra when f r =0 defines the surface. Note that the optical system [13], but published work has been limited to opti- path length of a ray through the entire system is given by ͚S−1 cal modeling rather than design, in that it does not treat W= s=1 nsws when ws is the ray path length for transfer the merit function or the optimization procedure. This from surface s to s+1. misses one of the central strengths of working in the ana- The first step in the proximate ray trace procedure is to lytical domain: the tractability of polynomial equations expand all of the relevant variables in the transfer and re- allows the use of more robust optimization techniques. fraction equations in various orders of approximation. Other attempts at analytical ray tracing have also been Thus, each ray trace variable is expressed in the form made. Walther [14,15] developed an analytical approach x =0+x͑1͒ + x͑2͒ + x͑3͒ + x͑4͒ + , which makes use of eikonals rather than rays and is thus ¯ ´ less accessible for many optical engineers. Kryszczynski ͑1͒ ͑2͒ ͑3͒ ͑4͒ [16] provided some tentative steps toward analytical de- y =0+y + y + y + y + ¯ , sign based on rays, but only supplies an outline of an al- ͑0͒ ͑1͒ ͑2͒ ͑3͒ ͑4͒ gorithm. Although it may at first appear mathematically z = z + z + z + z + z + ¯ , complex, we hope to show that the proximate ray tracing method makes the analytical approach both accessible ͑1͒ ͑2͒ ͑3͒ ͑4͒ cx =0+cx + cx + cx + cx + ¯ , and practical.

In the discussion below, we first review Hopkins’ ͑1͒ ͑2͒ ͑3͒ ͑4͒ method [6–8] and show how it can be readily generalized cy =0+cy + cy + cy + cy + ¯ , to arbitrary orders of approximation and to asymmetric ͑1͒ ͑2͒ ͑3͒ ͑4͒ systems. We then show how to construct the merit func- cz =1+cz + cz + cz + cz + ¯ , tion and optimizer for designing optical systems with this approach and present three example designs. Finally, we ͑0͒ ͑1͒ ͑2͒ ͑3͒ ͑4͒ ͑ ͒ w = w + w + w + w + w + ¯ . 4 conclude with a discussion of the advantages and disad- vantages of this technique. The superscripts in parentheses indicate the order of ap- proximation so that the first nonzero term on the right hand side of each of these equations represents a paraxial 2. TRANSFER variable, and succeeding terms represent the nonlinear Hopkins [6–8] described proximate ray tracing as an it- dependence on the paraxial variables. The term z͑0͒ rep- erative ray tracing technique in algebraic form. The basic resents the axial transfer distance from the surface vertex approach is to the previous surface (and is thus a negative quantity for rays propagating from left to right). 1. A polynomial series expansion for basic and inter- The primary variables used to define the rays, the en- mediate variables are inserted into the exact ray trace trance pupil coordinates ͑x ,y ͒ and the field angles equations. ep ep ͑␪ ,␪ ͒, are treated as paraxial variables and thus do not 2. Any sines and cosines are series-expanded, and any x y have an order-expansion. The final expressions for the multiplications, divisions, and square roots are performed rays will give the image coordinates in terms of these pri- as series operations. mary variables and of the parameters used to define each 3. Terms of a given order are collected together, and surface. In aberration theory it is more common to work higher-order terms are obtained using lower-order solu- with normalized field angles H, defined either as tions via a triangular set of equations. 2 ͑Hx ,Hy͒=͑1/␪max͒͑␪x ,␪y͒, where ␪maxϵ͓͑max͕␪x͖͒ 2 1/2 Ray tracing consists of two basic operations: transfer +͑max͕␪y͖͒ ͔ ,oras͑Hx ,Hy͒=͑␪x /max͕␪x͖,␪y /max͕␪y͖͒. and refraction. Using the ray path length w as the trans- In the presentation below, we will continue to use ␪ rather fer parameter, the transfer equations can be written as than H to represent field angles. ͑ ͒ The elements of the direction cosine vector for the inci- rs+1 = rs + wscs, 1 dent ray are given by cx =sin ␪x, cy =sin ␪y, and cz ͑ ͒ ͑ ͒ ͱ 2 2 where r= x,y,z is the ray position vector, c= cx ,cy ,cz is =± 1−cx −cy for a ray propagating in the ±z direction. the direction cosine vector, and s indicates the surface in- Thus dex (i.e., transfer from surface s to surface s+1). To sim- 1 plify the equations below, we will usually leave the sur- ͑c͑1͒ + c͑3͒ + ͒ = ␪ − ␪3 + , face index implied, except where it is needed. Here z is x x ¯ x 3! x ¯ Zheng et al. Vol. 27, No. 8/August 2010/J. Opt. Soc. Am. A 1793

the first-order equation allows one to solve for w͑1͒, and ͑ ͒ ͑ ͒ 1 ͑c 1 + c 3 + ͒ = ␪ − ␪3 + , we can likewise continue to substitute lower-order results y y ¯ y 3! y ¯ to obtain solutions for the higher-order equations. The re- sulting sequence of values for w, i.e., ͑w͑0͒ ,w͑0͒ +w͑1͒ ,w͑0͒ 1 1 1 ͑1͒ ͑2͒ ͑ ͒ ͑ ͒ ͑ ͒ +w +w ,...͒, provides an estimate of the real ray path ͑c 0 + c 2 + c 4 + ͒ =1− ͑␪2 + ␪2͒ + ͫ ͑␪2 + ␪2͒2 + ͑␪4 z z z ¯ 2 x y 16 x y 6 x length to increasing order of approximation. Once all de- sired orders of w have been solved for, one can then sub- stitute into the equations for x and y. As with w, the se- + ␪4͒ͬ + . y ¯ ͑ ͑0͒ ͑0͒ ͑1͒ ͑0͒ ͑1͒ ͑2͒ ͒ quence rs ,rs +rs ,rs +rs +rs ,... provides an estimate of the ray-surface intersection location to in- In Hopkins’ presentation [6–8] of the proximate ray creasing order of approximation (see Fig. 1). trace equations, the variables x, y, cx, and cy have only One further step is necessary before we can use this odd-order terms, and the variables z, cz, and w have only procedure to solve this set of equations. Since the various even-order terms due to his assumption of rotational sym- orders of the surface sag zs are not yet known, we cannot metry about the optical axis. In order to design more gen- yet solve directly for w. First we need to express zs in eral optical systems, we drop these symmetry assump- terms of known quantities, and for this we need to per- tions here and use the most general form of the equations. form the order-expansion of the surface equation. Substituting the order-expanded variables for r, c, and w into the transfer equations (1) results in

͑0͒ ͑0͒ 0=z0 + w , 3. SURFACE EQUATION The order-expansion of the surface equation is obtained ͑1͒ ͑1͒ ͑1͒ ͑0͒ ͑0͒ ͑1͒ rs = r0 + c w + c w , by taking its Taylor expansion, shown here for a surface in the form z=z͑x,y͒ r͑2͒ = r͑2͒ + c͑2͒w͑0͒ + c͑1͒w͑1͒ + c͑0͒w͑2͒, ץ ץ s 0 zs zs z ͑x ,y ͒ = z ͑0,0͒ + x ͫ ͬ + y ͫ ͬ s s s s s s yץ xץ 3͒͑ 0͒͑ 2͒͑ 1͒͑ 1͒͑ 2͒͑ 0͒͑ 3͒͑ 3͒͑ 3͒͑ rs = r0 + c w + c w + c w + c w , s ͑0,0͒ s ͑0,0͒ 2ץ 2ץ 1 zs zs ] + x2ͫ ͬ + x y ͫ ͬ ץ ץ s s 2 ץ s 2 xs ͑ ͒ xs ys ͑ ͒ in which we label the surface before transfer as s=0 and 0,0 0,0 2ץ that following transfer as simply s. Each line contains 1 zs + y2ͫ ͬ + , ͑6͒ only terms of equal order, such that the number of equa- s ¯ y2ץ 2 tions in the resulting system is equal to the desired order s ͑0,0͒ ͑ ͒ ͑ ͒ ͑ ͒ of approximation. Using the fact that c 0 =1 and c 0 =c 0 z x y ͑ ͒ ͑ ͒ =0, the transfer equations split into in which the xs ,ys = 0,0 subscript on each square bracket indicates that the partial derivatives are evalu- ͑0͒ ͑0͒ w =−z0 , ated at the axial surface point. From Eq. (6), we next sub- stitute in the order-expansion forms of ͑xs ,ys ,zs͒ and ͑1͒ ͑1͒ ͑1͒ ͑1͒ ͑0͒ equate terms of equal order, giving w = zs − z0 − cz w , ͑0͒ ͑ ͒ ͑2͒ ͑2͒ ͑2͒ ͑2͒ ͑0͒ ͑1͒ ͑1͒ zs = zs 0,0 , w = zs − z0 − cz w − cz w ,

ץ ץ zs zs ] z͑1͒ = x͑1͒ͫ ͬ + y͑1͒ͫ ͬ , yץ x sץ s s s ͑0,0͒ s ͑0,0͒ ͑1͒ ͑1͒ ͑1͒ ͑0͒ xs = x0 + cx w ,

()(1) (0) ͑2͒ ͑2͒ ͑2͒ ͑ ͒ ͑1͒ ͑ ͒ y' ,z' x = x + c w 0 + c w 1 , ()y,z(1) (0) s 0 x x ()y'(3) ,z'(1) ()y,z(3) (1) ]

͑1͒ ͑1͒ ͑1͒ ͑0͒ t ys = y0 + cy w ,

͑2͒ ͑2͒ ͑2͒ ͑0͒ ͑1͒ ͑1͒ ys = y0 + cy w + cy w , Fig. 1. (Color online) The transfer operation involves taking ͑5͒ low-order polynomial approximations of surfaces and modifying ] the surface intersection coordinates to increasing accuracy as ͑0͒ ͑0͒ higher orders are traced. Shown here are only the first- and The zeroth-order equation gives w =−z0 , which is sim- third-order approximations of a spherical surface. The ray path ply the axial distance from the previous surface vertex to length w from the left to right surfaces depends on the order of the current surface vertex. Substituting this result into approximation, as indicated in Eqs. (5). 1794 J. Opt. Soc. Am. A/Vol. 27, No. 8/August 2010 Zheng et al.

-the normalization condition for the direction cosine vec 2ץ ץ ץ ͑ ͒ ͑ ͒ zs ͑ ͒ zs 1 ͑ ͒ zs z 2 = x 2 ͫ ͬ + y 2 ͫ ͬ + ͓x 1 ͔2ͫ ͬ tor, ͉cЈ͉=1, we can solve for the refracted direction cosines x2ץ y 2 sץ x sץ s s s ͑0,0͒ s ͑0,0͒ s ͑0,0͒ cЈ, 2ץ 2ץ 1 zs zs B ± N ͱD + ͓y͑1͔͒2ͫ ͬ + x͑1͒y͑1͒ͫ ͬ , x x s s s cЈ = , ͑8͒ y x ץ xץ y2ץ 2 s ͑0,0͒ s s ͑0,0͒ Axy ͱ ] By ± Ny D Ј ͑ ͒ cy = , 9 In the case of a spherical surface with radius of curvature Axy R whose center of curvature lies on the optical axis, the ͱ 2 2 ͱ surface equation can be written as z=−R+ R −r (for rs B ± D s Ј z ͑ ͒ =ͱx2 +y2). The order-expansion of this surface produces cz = , 10 s s Az ͑0͒ zs =0, where

͑ ͒ 2 ͑ 2 2 2͒ 1 Axy = n2Nz Nx + Ny + Nz , zs =0,

2 2 2 2 ͑ ͒ A = n ͑N + N + N ͒, ͓r 1 ͔2 z 2 x y z ͑2͒ s zs = , 2R ͓ 2 ͑ ͔͒ Bx = n1n2Nz Nycx − NxNycy + Nz Nzcx − Nxcz ,

͑3͒ zs =0, ͓ 2 ͑ ͔͒ By = n1n2Nz Nxcy − NxNycx + Nz Nzcy − Nycz ,

͑1͒ ͑3͒ ͑1͒ 4 r r ͓r ͔ 2 2 ͑ ͒ s s s B = n n ͓− N ͑N c + N c ͒ + ͑N + N ͒c ͔, z 4 = + , z 1 2 z x x y y x y z s R 8R3 2 2͓ 2͑ 2 2 2͒ 2͑ 2͑ 2 2͒ D = n2Nz n2 Nx + Ny + Nz − n1 Nz cx + cy −2NxNzcxcz ] ͑ ͒ 2͑ 2 2͒ 2͑ 2 2͔͒͒ −2Nycy Nxcx + Nzcz + Ny cx + cz + Nx cy + cz , ͓ ͑1͔͒2 ϵ͓ ͑1͔͒2 ͓ ͑1͔͒2 where rs xs + ys . The even-order components ͑11͒ are equal to zero here due to rotational symmetry. Now we can see that higher-order forms of zs can be written in and n1, n2 are the refractive indices of the media before Ј terms of lower-order forms of xs and ys. Thus, if we return and after refraction. In the equations for c [Eqs. to Eqs. (5) and substitute in for the order-expanded form (8)–(10)], choosing for the solution the positive sign in of zs given here, we find that the higher-order equations front of the square root selects a ray propagating in the +z can all be expressed in terms of lower-order quantities, al- direction. lowing the full system of equations to be solved. The square root, multiplication, and division in Eqs. While we have shown the order-expansion of a spheri- (8)–(10) are each nonlinear procedures and so we must cal surface, one may also define a surface by an arbitrary perform each operation in the context of power series to polynomial in xs and ys, such that z=z͑x,y͒ is given by the appropriate order. The order-expansion of the square root can be done by searching for an order-expanded vari- ␣ ␣ ␣ 2 ␣ ␣ 2 ␣ 3 ␣ 2 zs = 1xs + 2ys + 3xs + 4xsys + 5ys + 6xs + 7xs ys able ␣, whose square is equal to D, i.e., + ␣ x y2 + ␣ y3 + . ͑7͒ ͑␣͑0͒ ␣͑1͒ ͒͑␣͑0͒ ␣͑1͒ ͒ ͑ ͑0͒ ͑1͒ ͒ 8 s s 9 s ¯ + + ¯ + + ¯ = D + D + ¯ . In this case the surface order-expansion gives This involves solving a triangular set of equations, ͑ ͒ 0 ͑0͒ ͑0͒ ͑0͒ zs =0, ␣ ␣ = D ,

͑1͒ ␣ ͑1͒ ␣ ͑1͒ ͑0͒ ͑1͒ ͑1͒ ͑0͒ ͑1͒ zs = 1xs + 2ys , ␣ ␣ + ␣ ␣ = D ,

͑2͒ ␣ ͑2͒ ␣ ͑2͒ ␣ ͓ ͑1͔͒2 ␣ ͑1͒ ͑1͒ ␣ ͓ ͑1͔͒2 ␣͑0͒␣͑2͒ ␣͑1͒␣͑1͒ ␣͑2͒␣͑0͒ ͑2͒ zs = 1xs + 2ys +2 3 xs + 4xs ys +2 5 ys , + + = D ,

͑ ͒ ] ] 12 Substituting the order-expanded variables into definition (11) of D and sorting terms by order, we can obtain the 4. REFRACTION expressions for D͑0͒, D͑1͒, etc. Inserting these into Eqs. The next step in the ray trace procedure is solving for the (12), we can solve the zeroth-order equation to give ␣͑0͒. refracted ray direction. By combining the refraction equa- Following the back-substitution procedure, we then use tions (2) and the equation for the surface normal (3) with each lower-order solution to solve each higher-order equa- Zheng et al. Vol. 27, No. 8/August 2010/J. Opt. Soc. Am. A 1795 y − ץ ␣ tion and eventually obtain all of the unknown terms in up to the desired order. z͑x,y͒ = , ͱ 2 2 2 ץ The next step is to perform the division step in Eqs. y R − x − y (8)–(10). For a division such as c=b/a in which all three so that the division, square root, and square operations ͑0͒ ͑1͒ variables are taken to have series form (i.e., c=c +c must be done in order-expansion form. In the case of the ͑2͒ +c +¯, etc.), we can solve this operation by first multi- polynomial surface example (7), however, we readily ob- plying both sides by a, tain the result explicitly, ͑ ͑0͒ ͑1͒ ͒͑ ͑0͒ ͑1͒ ͒ ͑ ͑0͒ ͑1͒ ͒ ͑0͒ ␣ c + c + ¯ a + a + ¯ = b + b + ¯ , Nx =− 1, and once again solving the resulting triangular set of ͑0͒ ␣ Ny =− 2, equations for the terms of c, ͑1͒ ͑1͒ ͑1͒ ͑ ͒ ͑ ͒ ͑ ͒ N =−2␣ x − ␣ y , c 0 a 0 = b 0 , x 3 s 4 s

͑1͒ ␣ ͑1͒ ␣ ͑1͒ Ny =− 4xs −2 5ys , c͑0͒a͑1͒ + c͑1͒a͑0͒ = b͑1͒, ͑2͒ ␣ ͑2͒ ␣ ͑2͒ ␣ ͓ ͑1͔͒2 ␣ ͑1͒ ͑1͒ ␣ ͓ ͑1͔͒2 Nx =−2 3xs − 4ys −3 6 xs −2 7xs ys − 8 ys , c͑0͒a͑2͒ + c͑1͒a͑1͒ + c͑2͒a͑0͒ = b͑2͒, ͑2͒ ␣ ͑2͒ ␣ ͑2͒ ␣ ͓ ͑1͔͒2 ␣ ͑1͒ ͑1͒ ␣ ͓ ͑1͔͒2 Ny =− 4xs −2 5ys − 7 xs −2 8xs ys −3 9 ys , ] ] via back-substitution. Performing this sequence of operations once for each of Finally, we also need to obtain the equation for the sur- Eqs. (8)–(10) gives the solution for the refracted ray direc- ١͓z͑x,y͒−z͔ so that=face normal vector N tion cosine vector cЈ. The resulting sequence of values for ͑ ͒ ͑ ͒ ͑ ͒ ͑ ͒ ͑ ͒ ͑ ͒ cЈ, i.e., ͑cЈ 0 ,cЈ 0 +cЈ 1 ,cЈ 0 +cЈ 1 +cЈ 2 ,...͒, provides an ץ N = z ͑x ,y ͒, estimate of the real refracted ray angle to increasing or- s s s ץ x xs der of approximation. Note that for an nth-order ray trace, the surface must be expanded to order n+1 prior to taking its derivative in order to obtain an nth-order form ץ N = z ͑x ,y ͒, for the surface normal. s s s ץ y ys While following this ray trace procedure manually is te- dious and error-prone, it can be made fast and robust ͑ ͒ through the use of modern computer algebra systems. In Nz =−1. 13 fact, most such systems provide enough functionality that As with all other nonprimary variables in the system, we the entire transfer and refraction operations can each be take an order-expansion of the normal vector components performed in a couple lines of code, and is typically ex- in terms of primary variables. The order-expansion for N ecuted within seconds for systems of modest complexity. takes the form (See Appendix A for comments on how to structure the code to help make this possible.) ͑0͒ ͑1͒ ͑2͒ ͑3͒ ͑4͒ Nx = Nx + Nx + Nx + Nx + Nx + ¯ , 5. MERIT FUNCTION ͑0͒ ͑1͒ ͑2͒ ͑3͒ ͑4͒ Ny = Ny + Ny + Ny + Ny + Ny + ¯ , The final result of a proximate ray trace calculation is to ͑1͒ ͑2͒ ͑1͒ ͑2͒ obtain x=x +x +¯ and y=y +y +¯, the position of ͑ ͒ ͑ ͒ ͑ ͒ ͑ ͒ ͑ ͒ the ray at the image plane to each order of approximation. N = N 0 + N 1 + N 2 + N 3 + N 4 + , ͑14͒ z z z z z z ¯ Each term is itself a function of the ray coordinate at the entrance pupil ͑x ,y ͒ and the incident ray angle ͑␪ ,␪ ͒ which we can use to replace the terms on the left hand ep ep x y so that we have a polynomial expression in these four side of each equation in Eqs. (13). On the right hand side variables in addition to all of the parameters used to de- of each equation, we can use the computer algebra system fine the various surfaces and their spacings. In order to to obtain the derivative of z and substitute into the result s design a system, we need to construct a merit function, the order-expansion forms of x and y . In general, this re- s s for which the mean square spot size is a common choice quires a great deal of analytical work to perform each [18]. Denoting the merit function by M, we can write mathematical operation in order-expansion form, but computer algebra systems can work through these steps M = ͵͵͵͵͓x͑͒− x ͔͑͒2 + ͓y͑͒− y ͔͑͒2dx dy d␪ d␪ , without difficulty. For example, for a spherical surface, G G ep ep x y the partial derivatives needed for Eqs. (13) are ͑15͒ ץ − x ͑͒ z͑x,y͒ = , where represents the variable and parameter depen- 2 2 2 ץ x ͱR − x − y dence of the ray coordinates, i.e., ͑xep,yep,␪x ,␪y ,...͒,in 1796 J. Opt. Soc. Am. A/Vol. 27, No. 8/August 2010 Zheng et al. which the ellipsis indicates the surface parameters of the or asymmetric systems of low complexity, existing algo- system. For a system of spherical surfaces in a rotation- rithms are capable of locating global minima. Beyond ally symmetric design, the surface parameters take the these, one must compromise between the computational form ͑R0 ,t0 ,n0 ,R1 ,t1 ,n1...͒—the radius of curvature, resources available and the restriction to local domains. spacing, and for the successive surfaces. In the examples shown in Section 7 below, for low com- In the merit function integral, ͑xG ,yG͒ is the Gaussian im- plexity systems, we use fast global techniques such as age point, for which we can simply substitute the first- Mathematica’s [20] NMinimize function, whereas for order solution of the ray location at the image plane, more complex problems we resort to simulated annealing. ͑x͑1͒ ,y͑1͒͒. If the designer wishes, it is also possible to constrain As in the ray trace procedure, if we wish to work with the optimization using implicit functions of the system an analytical merit function, we can insert the order- parameters. For example, if we wish to restrict the lens expanded variables for x͑͒and y͑͒in the above integral, diameters to be within some allowed range, then—given collect terms of like order, and perform the integral on the functional form of the ray at the appropriate each order independently. The resulting expression can be surface—we can obtain equations of constraint. For ex- quite long for optical systems of even moderate complex- ample, for a rotationally symmetric spherical lens, the ity, and so the use of a computer algebra program is es- surface equation gives sential here. If the optical system possesses rotational y2 y4 symmetry, we can simplify the merit function expression z͑y͒ = + + , to have the form 2R 8R3 ¯

for ray height y and radius of curvature R. Constraining y M = ͵͵͵͓x͑͒− x ͔͑͒2 + ͓y͑͒− y ͔͑͒2d␾␳d␳d␪, G G to be less than some value y0 allows us to solve for an equation of constraint on R. This can be used by the opti- in which the primary variables are no longer mization routine to look for solutions lying only within the valid design space. ͑xep,yep,␪x ,␪y ,...͒ but rather ͑␳,␾,␪,...͒. That is, the field angle can be expressed as a scalar, and the pupil location The optimization can run into trouble due to the sheer size of the analytical formulas produced by the ray trace, is now expressed in cylindrical coordinates, i.e., ͑xep,yep͒ =͑␳ cos ␾,␳ sin ␾͒. For the majority of imaging systems, especially for systems with more than a few surfaces and the most appropriate choice of integration range is a rect- with surfaces having many modeling parameters (such as angular field and a circular pupil. As long as the integra- high-order aspheres). When this happens, one thing that tion range allows us to obtain analytical functions for can be done is to fix some of the system parameters and polynomial integrands, then it remains possible to obtain optimize over the remaining ones. For example, if we fix an analytical function for the merit function as well. Note the thickness of a lens, then we can give it the numerical that the squaring of the terms in the integrand results in value during ray tracing so that it need not be tracked a merit function polynomial of order 2p+4 after integra- analytically. This can greatly simplify the resulting ex- tion, where p is the order of approximation in the ray pressions and make ray tracing and optimization much trace, and the additional four orders arise from the four faster. integrals of Eq. (15). In addition, if we wish to use the spot centroid rather than the Gaussian image point as our reference for the 6. EXAMPLE RAY TRACE merit function, a choice which amounts to ignoring the ef- Since the discussion up to this point has given the general fects of distortion on the image, then we can replace expressions for the proximate ray tracing technique, we ͑xG ,yG͒ with the appropriate centroid ͑¯x,¯y͒ given by illustrate the approach with a simple example, using the lens shown in Fig. 2 (see also Table 1). This lens model has been chosen such that the example ray trace can be ¯x͑͒= ͵͵͵͵x͑͒dx dy d␪ d␪ , ep ep x y presented easily on a printed page: an f/2.2 singlet cylin-

¯y͑͒= ͵͵͵͵y͑͒dx dy d␪ d␪ . ep ep x y

After constructing the merit function, the final step in designing an optical system is the implementation of an optimization algorithm to determine the system param- eters which minimize M. Here we run into many of the same problems encountered by optimization in the exist- ing design software: while local techniques are compact and fast, they typically cannot reach the global solution; Fig. 2. (Color online) 2D lens model used for the example. Once while global techniques are capable of finding the optimal the analytical model is completed, we substitute the following pa- solution, they require unrealistic computational resources rameter values to give the lens shown: t1 =5 mm, t2 =76.6667 mm, and the refractive index is n=1.5. The first lens in order to do so. (Reference [19] provides a useful survey surface is convex, and the second surface is planar. The resulting of modern algorithms for solving polynomial equations.) f/2.2 design has an entrance pupil diameter of 32 mm and a focal For rotationally symmetric systems of modest complexity length of 80 mm. Zheng et al. Vol. 27, No. 8/August 2010/J. Opt. Soc. Am. A 1797

Table 1. Prescription for the Lens Shown in Fig. 2 1 ͑2͒ ͓ 2 ͑ ͒2 ␪2 2 2 2 ␪ ͑ w1 = t1yep n −1 + yR t1n − yepR +2 yyepRt1n n s Radius of Curvature Thickness Index 2R2

Pupil 0 ϱ 0 −1͔͒,

Lens front 1 Rt1 n ϱ Lens back 2 t2 t1 Image 3 ϱ y͑1͒ = y ͑n −1͒ + y + ␪ t n, 2 R ep ep y 1 drical lens with the (planar) aperture stop placed to coin- 1 ͑3͒ ͑ ␪2 2 ͑ ͒͑ ͒ ␪3 3 ͑ 2 ͒ cide with the front surface of the lens. Limiting the ray y2 = 3 3 yyepR t1n n −1 1+3n + yR t1n 3n −1 trace to two dimensions reduces the definition of a ray to 6R its ͑y,z͒-coordinates and its angle ␪y. In the ray trace 3 ͑ ͓͒ ͑ ͔͒ ␪ 2 ͑ ͓͒ +3yep n −1 − R + t1 + t1n n −1 −3 yyepR n −1 R given below, all subscripts refer to the surface number s, ͑ 2 ͔͒͒ and we limit the approximation to third order for space + t1 3n + n −1 , reasons. To match common practice in ray tracing, the surface equations are expressed in terms of the surface z͑0͒ =0, vertex point, with the axial transfer distance inserted into 2 w͑0͒ in the transfer equations. The ray trace starts at the pupil plane ͑s=0͒, with the ͑2͒ z2 =0, primary variables yep and ␪y defining all incident rays. The first surface is defined by the equation and again refracting,

2 4 y y 1 z = + . ͑1͒ 2 3 3 ͓c ͔ = ͓6y R ͑n −1͒ −6␪ R n͔, 2R 8R y 2 6nR3 ep y Applying the transfer equations gives −1 2 ͓ ͑3͔͒ ͓␪3 3 ␪2 2 ͑ ͒ 3 ͑ ͒ yep cy 2 = 3 yR n −3 yyepR n n −1 −3yepn n −1 w͑0͒ =0, w͑2͒ = , 6R n 0 0 2R ␪ 2 ͑ 2 ͔͒ +3 yyepR 2n + n −1 , y2 ␪ ͑ ͒ ͑ ͒ ep y 1 3 ͑0͒ y1 = yep, y1 = , ͓c ͔ =1, 2R z 2

2 −1 y ͑2͒ 2 ͑0͒ ͑2͒ ep ͓c ͔ = ͓͑y ͑n −1͒ + ␪ Rn͔ ͒. z =0, z = , z 2 2 2 ep y 1 1 2R 2R n and the refraction equations for the refracted direction co- Finally, we transfer to the image surface. Here the only sines are quantity of interest is the ray coordinate y,soweomitthe expressions for w and z, 1 ͓c͑1͔͒ = ͫ ͑n −1͒y + ␪ nͬ, y 1 ep y 1 R y͑1͒ = ͓y ͑− t + nR − nt + nt + t n2͒ + ␪ R͑nt + n2t ͔͒, 3 Rn ep 2 1 2 1 y 2 1 1 ͓ ͑3͔͒ ͓␪3 3 ␪2 2 ͑ ͒ 3 ͑ ͒ cy 1 = 3 yR n −3 yyepR n n −1 −3yepn n −1 1 6R y͑3͒ = ͕y3 ͓3t ͑n4 −3n2 +3n −1͒ +3n3͑n −1͒͑− R + t 3 6R3n3 ep 2 1 ␪ 2 ͑ 2 ͔͒ −3 yyep n − n −1 , ͑ ͔͒͒ ␪ 2 ͓ ͑ ͒͑ 2 ͒ + t1n n −1 + yyep 3Rt2n n −1 2n +4n −3 ͓ ͑0͔͒ 3͑ ͒͑ ͑ 2 ͔͒͒ cz 1 =1, −3Rn n −1 R + t1 −3n + n −1 ␪2 ͓ 2 2͑ ͒͑ ͒ 2 4 ͑ ͒͑ + yyep 3R t2n n −1 n +3 +3R n t1 n −1 3n ͑ ͒ 1 ͓ 2 ͔ ͓ 2 ͑ 2͒ ͑␪ ␪ ͒ 3 3 3 3 4 2 cz 1 =− yep 1−2n + n + yep2n yRn − yR +1͔͒ + ␪ ͓2R t n + R t n ͑3n −1͔͖͒. 2R2 y 2 1 ␪2 2 2͔ + yR n . This is the analytical expression giving the location of all rays at the image plane in terms of the variables defining Transferring to the planar back surface of the lens, the incident ray ͑yep,␪y͒, and of the system parameters ͑R,t ,t ,n͒, to third-order approximation. In order to use ͑0͒ 1 2 w1 = t1, this model to design a lens, we construct a merit function, 1798 J. Opt. Soc. Am. A/Vol. 27, No. 8/August 2010 Zheng et al.

tem parameters are t1 =5 mm, t2 =76.6667 mm, the M = ͵͵͓y ͑͒− y͑1͔͒͑͒2dy d␪ = ͵͵͓y͑3͔͒͑͒2dy d␪ . 3 3 ep y 3 ep y refractive index n=1.5, and the rectangular field of view is 5° Յ␪y Յ7° and −1° Յ␪x Յ+1°. Thus, the equations for At this point, we have not defined any of the system pa- the front and back surfaces of the lens are defined as rameters, pupil size, or field of view. Defining the latter z = ␣ x2 + ␣ y2 + ␣ y3 + ␣ x2y + ␣ x4 + ␣ y4 + ␣ x2y2, two allows us to perform the above integrals, and a typi- front 1 2 3 4 5 6 7 cal optical design procedure would involve fixing the val- ␤ 2 ␤ 2 ␤ 3 ␤ 2 ␤ 4 ␤ 4 ␤ 2 2 zback = 1x + 2y + 3y + 4x y + 5x + 6y + 7x y , ues of t1, t2, and n—or constraining their ranges—prior to searching for the optimum. (If these three parameters are with the ␣s and ␤s coefficients left to be determined by the allowed to vary freely, one can always obtain a zero- optimizer. Since the system is symmetric about the x=0 →ϱ →ϱ Ϯ aberration solution by letting n or t2 .) For a 10° plane, all odd-order terms in x are necessarily zero. field of view and a 32 mm pupil diameter, and fixing the In order to compare the results with conventional de- system parameters at t1 =5 mm, t2 =76.6667 mm, and n sign approaches, we designed this lens using both the =1.5, we find the optimal radius of curvature to be R proximate ray trace technique and Zemax [21], with the =41.75 mm. resulting coefficients shown in Table 2. The figure of merit Even for such a simplified case, we can see that the ex- from each design can be calculated in either the domain pressions are lengthy so that performing design in the used by proximate ray tracing (i.e., an approximate ana- analytical domain requires interacting with these func- lytical model) or the domain used by Zemax (i.e., an exact tions via computer algebra systems. They do, however, sampled model), with the following results: provide a much more informative description of the ray intercepts’ nonlinear dependence on each given system Merit Function Design Method parameter. This can create a problem of information over- load, in contrast to the information uncertainty produced Domain Proximate Zemax by sampled exact ray tracing. Analytic Approx. 0.00118 0.00205 Note that one needs not expand all surfaces to the same Sampled Exact 0.07483 0.05635 polynomial order of approximation. The only restriction here is that the order of approximation in the ray trace Note that both merit functions require approximations— needs to be at least as much as the highest order used for truncated order in the case of proximate ray tracing and the surfaces within the system. sampling in the case of Zemax’s default method. The second design example shows a setup appropriate 7. DESIGN EXAMPLES to the design of a lenslet used in a multiscale lens [22]. A multiscale lens involves the use of a standard objective To illustrate the performance and flexibility of our design lens combined with a back-end lenslet array used to per- approach, we show the design of three example systems form remapping and aberration correction on the image and compare to results derived with conventional optical prior to detection. The modeling of these systems can be design software. While comparisons between conven- quite complex since the lenslet elements are designed to tional and new techniques developed during research are have freeform surfaces, and pupil vignetting is both large almost invariably unfair, in that more effort is put into and varies rapidly with field angle. The number of sur- optimizing the latter than the former for the specific cases faces present in the system is small, however, making the at hand, what we wish to show is that the approach dif- problem tractable for analytical ray tracing. fers qualitatively from conventional methods and is ca- pable of providing equivalent answers in a wide variety of Table 2. Surface Parameters Obtained for the designs so that it shows promise as a new design tool. First Design Example (an Off-Axis Singlet)a The first example is a variant of the example ray trace performed in Section 6, but this time using the lens off- Proximate Zemax axis and allowing the two surfaces to be freeform x-y poly- ␣ ϫ −2 ϫ −2 nomials rather than spherical (see also Fig. 3). The sys- 1 1.188 10 1.136 10 ␣ ϫ −2 ϫ −2 2 1.137 10 1.114 10 ␣ ϫ −6 ϫ −5 3 3.620 10 −2.893 10 ␣ ϫ −5 ϫ −5 4 1.116 10 −1.790 10 ␣ ϫ −7 ϫ −7 5 −3.863 10 2.478 10 ␣ ϫ −6 ϫ −6 6 −1.573 10 −1.097 10 ␣ ϫ −6 ϫ −7 7 1.839 10 −8.058 10 ␤ ϫ −4 ϫ −3 1 −5.649 10 −1.124 10 ␤ ϫ −4 ϫ −3 2 −9.805 10 −1.234 10 ␤ ϫ −6 ϫ −5 3 2.782 10 −2.856 10 ␤ ϫ −5 ϫ −5 Fig. 3. (Color online) The lens used in the first design example: 4 1.150 10 −1.675 10 ␤ ϫ −6 ϫ −7 a freeform x-y polynomial singlet lens with an off-axis field. The 5 −1.014 10 −1.410 10 system parameters are similar to those of Fig. 2: t =5 mm, t ␤ ϫ −6 ϫ −6 1 2 6 −2.030 10 −1.400 10 =76.6667 mm, and the refractive index is n=1.5, while the sur- ␤ 1.034ϫ10−6 −1.467ϫ10−6 face parameters are the 14 polynomial coefficients (seven for 7 each surface) out to fourth order. The field of view for this design aThe proximate ray trace is performed out to sixth order and optimized with Յ␪ Յ Յ␪ Յ is 5° y 7° and −1° x +1°. simulated annealing; the Zemax results use damped least-squares optimization. Zheng et al. Vol. 27, No. 8/August 2010/J. Opt. Soc. Am. A 1799

This example illustrates the design of a single lenslet Table 3. Multiscale Lens Design Example Layout within the array. The goal of the design is to re-image a and Prescription section of the initial image plane and also to perform ab- erration correction so that the re-imaged field contains Radius of Curvature Thickness s (mm) (mm) Index less blur than the original field. In the case here, the field angles re-imaged by the lenslet are 5.75° Ͻ␪Ͻ8.25°, the Pupil 0 ϱ 20 entrance pupil diameter is 8 mm, and the lenslet itself is Obj. lens front 1 79.60 6 1.5168 4 mm in diameter. For the lenslet shown here, the free- Obj. lens back 2 −55.80 72.02 form rear surface is modeled using an x-y polynomial First image 3 ϱ 62.44 while the front surface is spherical so that the rear sur- Coord. break: rotate about x axis by 4.54° face has the equation Lenslet front 4 7.88 1 1.8 Lenslet back 5 ϱ 9 z = ␣ x2 + ␣ y2 + ␣ y3 + ␣ x2y + ␣ x4 + ␣ y4 + ␣ x2y2. 1 2 3 4 5 6 7 Final image 6 ϱ The optical layout and prescription for this setup are given in Fig. 4 and Table 3. Once again performing the proximate ray trace to sixth gion is thus 2 mm long, and we wish to maximize the order and constructing the merit function, the simplicity amount of incident reaching this region. If we con- of this problem allows us to use the general-purpose fine ourselves to analyzing the system in two dimensions, NMinimize function in Mathematica. Likewise using Ze- then the surface equations for this lens are max’s default optimization tool (damped least-squares), ␣ 2 ␣ 4 ␣ 6 we obtain the following results: zfront = 1y + 2y + 3y ,

Merit Function Design Method ␤ 2 ␤ 4 ␤ 6 zrear = 1y + 2y + 3y . Domain Proximate Zemax A naive attempt at constructing a merit function for this problem would be something like Analytic Approx. 0.0003428 0.002169

Sampled Exact 0.12713 0.01467 Dep/2 20° M = ͵ dy ͵ d␪ y2, ep y As before, we find that each method is optimal in its own −Dep/2 −20° domain, although the two designs are quite similar in where y gives the position of the ray at the image plane shape (see Table 4). and D is the diameter of the entrance pupil. While this The third design example is a rotationally symmetric ep function penalizes rays which stray too far from the axis, nonimaging concentrator, where each of the lens surfaces what we really want is a penalty which is zero or very is even aspheric. The goal here is different from that of small for rays falling onto the concentration region, but the two previous examples in that we are no longer con- very large for rays falling outside it. The implementation cerned with imaging quality per se. Rather, we want to of this approach is tricky, however, as it requires ᐉ mini- maximize the amount of light we can concentrate onto a 1 mization rather than the much more widely used ᐉ mini- given region at the “image plane”—what we call the con- 2 mization techniques, and also it requires that we work di- centration region. Thus, for a given range of incident ray rectly with image coordinates as primary variables, angles, we attempt to maximize the number of rays inci- rather than the object coordinates we have been using up dent on the concentration region. to now. This is a topic we hope to treat at length in a fu- Due to symmetry, we can produce an approximate so- ture publication. lution by confining the field angles and pupil coordinates An alternative optimization approach takes advantage to the meridional plane. Thus, we consider a field of view of the edge ray principle [[23], p. 183]. The phase space for of −20° Յ␪ Յ+20°; the entrance pupil diameter is 2.93 y rays propagating through the system (Figs. 5 and 6) are mm, the system track length is 3.14 mm, and the image bounded by the square abcd. We can choose to map those size is −1 mmՅyՅ+1 mm. (This design example is mod- eled after [[23], pp. 189–192].) The light concentration re- Table 4. Surface Parameters Obtained for the Second Design Example (Multiscale Lenslet)a

Proximate Zemax

␣ 1 −0.070 26 −0.066 25 ␣ 2 −0.068 24 −0.064 25 ␣ 3 0.000 08 0.000 19 ␣ Fig. 4. (Color online) The multiscale lens design example layout 4 0.000 02 0.000 17 ␣ and prescription. The objective is fixed, while we attempt to de- 5 0.002 35 0.001 38 sign the lenslet to perform aberration correction on the nominal ␣ 6 0.002 24 0.001 31 image (shown by the curved surface between the ) and re- ␣ image onto a tilted detector array (shown at the far right). The 7 0.004 02 0.002 38 ϫ square pupil is 8 mm 8 mm in size, and the objective lens focal aThe proximate ray trace is performed out to sixth order and optimized with length is 64.45 mm. The lenslet re-images a 2.5° ϫ2.5° square Mathematica’s NMinimize function; the Zemax results use damped least-squares op- field of view. timization. 1800 J. Opt. Soc. Am. A/Vol. 27, No. 8/August 2010 Zheng et al.

the lens back surface. Since aЈ point has the smallest yep value among those rays within the phase-space line aЈb, it should also have the largest ray angle when hitting the upper edge of the back surface so that its ray angle after refraction by the back surface will also be largest. Thus, it will reach the image plane with the largest y coordinate, ym, and all other rays along the line aЈb in phase space will reach the image plane below ym. Since the ray from point c in phase space hits the image plane at −ym, all rays from the phase-space line bc should reach the image plane inside the concentration region ͑−ym ՅyՅym͒. And, due to symmetry, the phase-space lines cd and da will fall inside the concentration region as well. Note that this ap- Fig. 5. Phase space of the incident rays. proach is not exact: it is possible to generate a surface which violates these assumptions. Moreover, while we can rays represented by line aaЈ to the edge of the concentra- use this one-dimensional design approach to generate a two-dimensional (2D) surface by rotating the design sur- tion region—a point we designate as ym—and map the rays represented by line aЈb to the edge of the back sur- face about the axis, the analysis above has ignored skew rays within the system. Nevertheless, we can obtain a face of the lens—a point we designate as ͑yk ,zk͒. By sym- metry, this likewise forces all the rays represented by line useful design using the above approach, and upon opti- mizing M with the proximate ray trace equations for y ccЈ to focus near −ym, and all the rays represented by line and y , we obtain the design, cЈd to focus near ͑−yk ,zk͒. The corresponding merit func- 3 tion can be given the form ␣ ␤ 1 = 0.297 73, 1 = − 0.038 88, Dep/2 M = ͵ ͓͑y − y ͒2 + ͑z − z ͒2͔dy ͫ 3 k 3 k ep ␣ ␤ ͑ ͒ 2 = 0.018 92, 2 = 0.023 36, Dep/2 −yaЈ ͑D /2͒−y Ј ep a ␣ ␤ + ͵ ͑y − y ͒2dy , 3 = 0.001 71, 3 = 0.002 53, m epͬ −Dep/2 ␪ =20° The resulting lens is shown in Fig. 7 together with a dia- gram illustrating the ray mapping. Figure 8 shows the re- where yaЈ is the yep value of ray aЈ. (The value of yaЈ is determined during the optimization step.) The coordinate sulting concentration performance, giving the transmis- sion (portion of rays reaching the concentration region) as ͑y3 ,z3͒ is the ray position on the back surface of the lens— surface 3 in the system. The reason for choosing this a function of the incidence angle. merit function is as follows: when the incident ray changes continuously in phase space along the phase- space boundary from point a to b, c, d, and back to a, the 8. CONCLUSION corresponding ray at the image plane will also change The first implementation of proximate ray tracing, by continuously in phase space and form a closed loop. Ac- Hopkins in 1976 [6–8], appears to have been done as a cording to the edge ray principle all the incident rays method of reducing the computational burden and com- within the rectangular region abcd in phase space will plexity for calculating higher-order aberrations. By sam- fall into the closed loop in the phase space of the rays at pling a specific set of rays passing through the system, the image plane, bounded at the image plane within the one is able to obtain each of the various aberration coeffi- range −ym to ym. cients. Our own implementation adapts the proximate ray We choose the line aaЈ to reach the ym point at the im- tracing concept for use in computer algebra systems in or- age plane, and also the line aЈb to hit the upper edge of der to perform the entire procedure in the analytical do- main. This is an important advance in that the analytical +ym formulas provide information of a qualitatively different b character than that provided by conventional ray tracing. a‘ Some examples of these advantages include: (1) the aber- ration terms can be simply picked out of the final expres- sion for the W=͚snsws as a function of the incidence angle ͑Hx ,Hy͒ and pupil coordinates −ym ͑xep,yep͒; (2) the optimization procedure can take advan- a tage of the properties of well-behaved functions (e.g., poly- nomials) such as their infinite differentiability; (3) there Fig. 6. (Color online) The approximate ray trace used by the is no need to consider sampling density or similar issues edge ray principle for designing a concentrator lens. The labeled required for discrete ray tracing; and (4) the analytical rays a, aЈ, and b are the phase-space points given in Fig. 5. Ray functional form more clearly shows some of the difficulties aЈ maps to the edge of the concentration region, at a distance ym from the optical axis, while ray b is bent downward so that it that ray tracing can encounter, such as the presence of Ͻ reaches the image plane at y ym. singularities [25] that can affect the convergence of aber- Zheng et al. Vol. 27, No. 8/August 2010/J. Opt. Soc. Am. A 1801

y

0.97

0.96

0.95

0.94

0.93

yep −−1.5 1.0 −0.5 0.5 1.0 1.5 (a)(b) Fig. 7. (Color online) (a) Layout of the concentrator lens obtained via the edge ray principle design method; (b) the profile of ray position ␪ y at the image plane as a function of entrance pupil position yep for =20°.

ration series. We plan to present a more thorough discus- require interaction with the designer after defining the sion of these properties in a subsequent publication. first-order properties of the system. Each of the advantages stated above can also be given The drawbacks to analytical ray tracing include (1) for for the matrix approaches to analytical ray tracing all but extreme cases, analytical ray tracing will be much [10–13]. The difference between the implementation pre- slower than numerical exact ray tracing; (2) the analyti- sented here and the matrix methods is that our approach cal formulas produced by the method can be quite is more easily adaptable to general-purpose use by having lengthy; and (3) analytical ray formulas are harder to in- the computer algebra program perform much of the ge- terpret due to their unfamiliarity. While each of these neric analytical calculations, such as obtaining the sur- drawbacks is important, they reflect the trade-off of the face normal, converting coordinate systems, and develop- new information obtained about a given design. ing systems of equations out to arbitrary order. In addition, while the research presented here considers only monochromatic systems, we are currently adding (or wavenumber, depending on the choice of APPENDIX A coordinate) as an additional primary variable and devel- Due to the length of the polynomial expressions which oping our code for use in multiwavelength systems. This need to be manipulated for asymmetric systems and high- is an essential additional step for optical system design order approximations, an important feature of an analyti- which will be new to analytical ray tracing. cal ray tracing engine is an efficient means of performing The three design examples presented in Section 7 illus- each required operation. While [13] presents a code for trate the flexibility of the analytical approach to treat sys- performing an order-expansion operation, the algorithm tems of arbitrary symmetry and to produce accurate de- used is quite slow for large expressions. An alternative signs. In all three cases the optimization process in both approach which is simple to apply for even very large ex- the proximate and numerical ray trace designs does not pressions is the following. For each of the order-expanded variables present in an expression, we can represent the Transmission sum as a vector where each element of the vector repre- 1.0 sents the appropriate order of expansion. Thus, for ex- ample, inside the computer algebra system we can repre- 0.8 sent the variable y as the vector

0.6 y = ͑y͑0͒,y͑1͒,y͑2͒,y͑3͒,...͒T, ͑A1͒

0.4 so that the multiplication operation between variables x and y, for example, is computed via vector multiplications 0.2 as Incident angles (degrees) T T 0 5 10 15 20 25 1 xy 1, Fig. 8. (Color online) Concentrator example’s performance is il- lustrated by showing the portion of transmitted rays reaching where 1 is the vector of appropriate length containing 1’s the concentration region as a function of incidence angle. The ex- T ample shown here (solid line) compares well with that shown in for each element. Here the inner operation, xy , gener- Fig. 8.9 of [24] (dashed line). A vertical line at 20° illustrates the ates a matrix containing all combinations of elements of x maximum angle of incidence used in the design. with elements of y, i.e., 1802 J. Opt. Soc. Am. A/Vol. 27, No. 8/August 2010 Zheng et al.

x͑0͒y͑0͒ x͑1͒y͑0͒ x͑2͒y͑0͒ ... 3. S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi, “Optimiza- tion by simulated annealing,” Science 220, 671–680 (1983). x͑0͒y͑1͒ x͑1͒y͑1͒ x͑2͒y͑1͒ ... 4. X. Chen and K. Yamamoto, “An experiment in genetic opti- T xy = ͑0͒ ͑2͒ ͑1͒ ͑2͒ ͑2͒ ͑2͒ . mization in lens design,” J. Mod. Opt. 44, 1693–1702 ΂x y x y x y ...΃ (1997). 5. R. Horst, P. M. Pardalos, and N. V. Thoai, Introduction to ]]] Global Optimization, 2nd ed. (Springer, 2000). The outer operations perform the summation over all ma- 6. G. W. Hopkins, “Proximate ray tracing and optical aberra- tion coefficients,” J. Opt. Soc. Am. 66, 405–410 (1976). trix elements. As given here, a computer algebra system 7. G. W. Hopkins, “Proximate ray tracing and aberration needs to check the power of each of the variables used in coefficients,” J. Opt. Soc. Am. 66, 942–949 (1976). the expressions and add the powers of all variables within 8. G. W. Hopkins, “Aberrational analysis of optical systems: a a given term, in order to obtain the order of a given term. proximate ray trace approach,” Ph.D. thesis (University of It is possible to achieve this in a single step by adding an Arizona, 1976). 9. J. von zur Gathen and J. Gerhard, Modern Computer Alge- indicator variable, which we name g. The vector expres- bra (Cambridge U. Press, 1999). sion for g is given as 10. M. Kondo and Y. Takeuchi, “Matrix method for nonlinear transformation and its application to an optical lens sys- ͑ 2 3 ͒T g = 1,g,g ,g ,... . tem,” J. Opt. Soc. Am. A 13, 71–89 (1996). 11. V. Lakshminarayanan and S. Varadharajan, “Expressions When we define the vector representation of each variable for aberrations coefficients using nonlinear transforms,” to be used, instead of Eq. (A1) we use Optom. Vision Sci. 74, 676–686 (1997). 12. J. B. Almeida, “General method for the determination of ͑0͒ ͑1͒ 2 ͑2͒ 3 ͑3͒ y · g = ͑y ,gy ,g y ,g y ,...͒, matrix coefficients for high-order optical system modeling,” J. Opt. Soc. Am. A 16, 596–601 (1999). where the “·” operator represents an element-by-element 13. J. B. Almeida, “Programming matrix optics into Math- multiplication. The indicator vector g is likewise applied ematica,” Optik (Stuttgart) 116, 270–276 (2005). to all variables used in expressions applying order- 14. A. Walther, “Eikonal theory and computer algebra,” J. Opt. expansion methods. When operations such as the x-y mul- Soc. Am. A 13, 523–531 (1996). 15. A. Walther, “Eikonal theory and computer algebra II,” J. tiplication shown above are performed, one now needs Opt. Soc. Am. A 13, 1763–1765 (1996). only to locate the power of g in order to obtain the order of 16. T. Kryszczyn´ ski, “First steps towards an algebraic method a given term. of the optical design in the range of all aberration orders,” This ability is even more convenient for setting up and in 11th Slovak-Czech-Polish Optical Conference on Wave and Quantum Aspects of Contemporary Optics (1999), pp. solving systems of equations such as those for transfer or 336–342. refraction. For example, when calculating the expansion 17. M. Born and E. Wolf, Principles of Optics, 7th ed. (Cam- of the square root, as in Section 4, instead of manually bridge U. Press, 1999). setting up the matrix of equations and solving them at 18. G. W. Forbes, “Optical system assessment for design: nu- each nonlinear operation, one needs only to ask the com- merical ray tracing in the Gaussian pupil,” J. Opt. Soc. Am. A 5, 1943–1956 (1988). puter algebra system to perform the Taylor expansion of 19. V. Y. Pan, “Solving a polynomial equation: some history and the equation in the variable g. While not optimal in terms recent progress,” SIAM Rev. 39, 187–220 (1997). of the computational speed, this method greatly simplifies 20. Wolfram Research, Inc., www.wolfram.com. the code, for improved readability and comprehension. 21. ZEMAX Development Corp., www.zemax.com. 22. D. J. Brady and N. Hagen, “Multiscale lens design,” Opt. Express 17, 10,659–10,673 (2009). 23. N. Shatz and J. C. Bortz, “Global optimization of high- REFERENCES performance concentrators,” in Nonimaging Optics 1. D. Shafer, “Global optimization in optical design,” Comput. (Elsevier, 2005), Chap. 11, pp. 265–304. Phys. 8, 188–195 (1994). 24. R. Winston, J. C. Miñano, and P. Benítez, Nonimaging Op- 2. A. E. W. Jones and G. W. Forbes, “An adaptive simulated tics (Elsevier, 2005). annealing algorithm for global optimization over continu- 25. G. W. Forbes, “Extension of the convergence of multivariate ous variables,” J. Global Optim. 6, 1–37 (1995). aberration series,” J. Opt. Soc. Am. A 3, 1376–1383 (1986).