Numerical evaluation of the Luneburg integral and ray tracing

4
TECHNICAL NOTE Numerical evaluation of the Luneburg integral and ray tracing Gleb Beliakov The Luneburg integral has many applications in optics and optoelectronics, among which is determina- tion of the refractive-index profile of a Luneburg lens with a full or nonfull aperture. Consequently, computationally efficient and accurate methods for evaluating this integral represent an important challenge. An alternative approach to numerical evaluation of the Luneburg integral that is five times faster than existing methods is described. Several improvements in the ray-tracing procedure in gradient-index media are also presented. A combination of these methods increases the speed of ray tracing through the generalized Luneburg lens by as many as 2 orders of magnitude compared with earlier algorithms. The precision of our method can be easily controlled. Key words: Luneburg integral, Luneburg lens, ray tracing, numerical integration, splines. r 1996 Optical Society of America 1. Luneburg Integral Evaluation The generalized Luneburg lens, widely discussed in the literature, 1,2 can be defined as a spherically symmetric, inhomogeneous optical structure with perfect imaging between a pair of spherical surfaces concentric with the center of the lens. The refrac- tive-index profile of lens n1r2 is given by the following functional equations: n 5 exp3w1 p, s 0 2 1 w1 p, s 1 24, p 5 nr, where s 0 and s 1 are the radii of the concentric spheres. Special function w1 p, s2, defined as w1 p, s2 5 1 p e p 1 arcsin 1 t s 2 1t 2 2 p 2 2 1@2 dt, 112 is called the Luneburg integral. It plays a specific role in optics and appears to be omnipresent in the problems of perfect imaging. Because w1 p, s2 is not a smooth function; its deriva- tive with respect to the first argument, w1 p, s2 p 5 1 pp 3 p 4 2 1 2 arcsin 1 p 2 1 s 2 2 2 s 2 2 p 2 2 2 arcsin11@s2 11 2 p 2 2 1@2 4 , is not continuous in p 5 1, the resulting refractive index is not smooth. To obtain smooth profile n1r2, the generalized Luneburg lens with a nonfull aper- ture was introduced. 1,2 Its refractive index in the inner part, 0 # r # b, is given by n 5 f 1 p2, p 5 nr, where f 1 p2 is a combination of integrals of the type in Eq. 112 with elementary functions, which de- pends on the choice of refractive index in the outer part of the lens. In particular, in Ref. 2 f is defined as f 1 p2 5 f 1a251 1 31 2 1 p@a2 2 4 1@2 6exp A w1 p@a, v@a2 2 2w1 p@a,1@a2 2 qC 2 1 12q 1 121a 2 p2 1 2 q p 3CA 1 11 2 p 2 2 1@2 arctan1C@A24 2 212q 1 12 p 3 5 CB 1 arctan1C@A2 2 p arcsin 3 C a11 2 p 2 2 1@246B , 122 The author is with the Department of Mathematics, University of Melbourne, Melbourne, Australia. Received 28 August 1995. 0003-6935@96@071011-04$06.00@0 r 1996 Optical Society of America 1 March 1996 @ Vol. 35, No. 7 @ APPLIED OPTICS 1011

Transcript of Numerical evaluation of the Luneburg integral and ray tracing

Page 1: Numerical evaluation of the Luneburg integral and ray tracing

TECHNICAL NOTE

Numerical evaluation of theLuneburg integral and ray tracing

Gleb Beliakov

The Luneburg integral has many applications in optics and optoelectronics, among which is determina-tion of the refractive-index profile of a Luneburg lens with a full or nonfull aperture. Consequently,computationally efficient and accurate methods for evaluating this integral represent an importantchallenge. An alternative approach to numerical evaluation of the Luneburg integral that is five timesfaster than existing methods is described. Several improvements in the ray-tracing procedure ingradient-index media are also presented. A combination of these methods increases the speed of raytracing through the generalized Luneburg lens by as many as 2 orders of magnitude compared withearlier algorithms. The precision of our method can be easily controlled.Key words: Luneburg integral, Luneburg lens, ray tracing, numerical integration, splines. r 1996

Optical Society of America

1. Luneburg Integral Evaluation

The generalized Luneburg lens, widely discussed inthe literature,1,2 can be defined as a sphericallysymmetric, inhomogeneous optical structure withperfect imaging between a pair of spherical surfacesconcentric with the center of the lens. The refrac-tive-index profile of lens n1r2 is given by the followingfunctional equations:

n 5 exp3w1p, s02 1 w1p, s124, p 5 nr,

where s0 and s1 are the radii of the concentricspheres. Special functionw1p, s2, defined as

w1p, s2 51

p ep

1 arcsin1ts21t2 2 p221@2

dt, 112

is called the Luneburg integral. It plays a specificrole in optics and appears to be omnipresent in theproblems of perfect imaging.

The author is with the Department of Mathematics, Universityof Melbourne, Melbourne, Australia.Received 28August 1995.0003-6935@96@071011-04$06.00@0r 1996 Optical Society of America

Becausew1p, s2 is not a smooth function; its deriva-tive with respect to the first argument,

≠w1p, s2

≠p5

1

pp 3p

421

2arcsin1p

2 1 s2 2 2

s2 2p2 22 arcsin11@s2

112p221@2 4 ,

is not continuous in p 5 1, the resulting refractiveindex is not smooth. To obtain smooth profile n1r2,the generalized Luneburg lens with a nonfull aper-ture was introduced.1,2 Its refractive index in theinner part, 0 # r # b, is given by n 5 f 1p2, p 5 nr,where f 1p2 is a combination of integrals of thetype in Eq. 112 with elementary functions, which de-pends on the choice of refractive index in the outerpart of the lens. In particular, in Ref. 2 f is definedas

f 1p2 5 f 1a251 1 31 2 1p@a2241@26expAw1p@a, v@a2

2 2w1p@a, 1@a2 2 qC2 1 12q 1 121a 2 p2

1 2q

p3CA1 112p221@2arctan1C@A242

212q1 12

p

3 5CB1 arctan1C@A22p arcsin3 C

a112p221@246B ,122

1 March 1996 @ Vol. 35, No. 7 @ APPLIED OPTICS 1011

Page 2: Numerical evaluation of the Luneburg integral and ray tracing

where

A 5 11 2 a221@2, B 5 ln11 1 A

a 2 ,

q 5aB 2 1⁄2 arcsin1a@v2 2 arccos1a2

2a1A 2 B2

are the constants, determined by the refractive indexin the outer part of the lens,

n1r2 51

r11 2 31 2 4q ln1r241@2

2qr, b # r # 1.

Here a denotes a given lens aperture, v is the focaldistance, b 5 exp5211 2 a231 1 q11 2 a246, and C 5

1a2 2 [email protected] is clear from Eq. 122 that the second parameter of

w1p, s2 may cover the s . 1 range. 5For s 5 1 theintegral in Eq. 112 has an analytical representation ofw1p, 12 5 1@2 ln31 1 11 2 p221/24.6 On the other hand,the practical problems in computer modeling opto-electronic devices 1e.g., ray tracing3–92 require exten-sive evaluation of n1r2 and its derivative; therefore itis convenient to have an accurate and computation-ally inexpensive algorithm to evaluate Eq. 112 for anyreasonable choice of p and s.In the past decade several approaches to comput-

ing Eq. 112 have been presented.10–14 Sochacki etal.12 gave a comprehensive overview of these meth-ods and discussed their advantages and shortcom-ings. These authors concluded that for values of sthat were more than 1.5 the most precise andnumerically efficient method for evaluating Eq. 112 isthe series representation from Ref. 13:

w1p, s2 <11 2 p221@2

p om50

M 1

12m 1 122s2m11

3 on50

m 12n2!p21m2n2

4n1n!22. 132

The maximum of the truncation error emax1M2 is13

emax1M2 #1

212M 2 1211 2 p221/231 1 ln1s24s2M11.

A slightly improved estimate of emax1M2 is given inRef. 12. For small values of s, s , 1.2, a similarseries representation was presented in Ref. 12, andits maximum truncation error is

emax1M2 #1s2 2 12M11

2p1M 1 1212M 1 121@212M 1 321@2.

Nonetheless the above series representations aretoo expensive when Eq. 122 is used to evaluate n1r2.On the one hand, entries w1p@a, v@a2, w1p@a, 1@a2must be computed with high precision, because theydo not determine the refractive index explicitly but

1012 APPLIED OPTICS @ Vol. 35, No. 7 @ 1 March 1996

are used in an iterative algorithm to solve the systemof nonlinear equations to determine refractive indexn1r2 at any position. Therefore, to achieve desirableaccuracy for n1r2, say with a relative error, err5 1028,all intermediate calculations must be performedwith much higher precision. On the other hand,truncation errors for the series representations fromRefs. 12 and 13 grow when the second argument inw1p, s2 is in the 1.2 # s # 1.5 range, which is exactlythe range in which the value of the integral isneeded: The value of aperture a is around 0.7–0.9,and 1@a is in the 1.1–1.4 range. Consequently, alarge number of terms 1,60 to obtain err 5 102102must be taken in the series representation.We now present an alternative approach to evalu-

ating the Luneburg integral. The numerical evalu-ation of Eq. 112 by standard techniques runs intodifficulty because of an 1integrable2 singularity at t 5p. This singularity can be removed by changingvariable t 5 x2 1 p to give

w1p, s2 52

p e0

112p2p1@2 arcsin1x2 1 p

s 21x2 1 2p21@2

dx. 142

The integrand on the right-hand side of Eq. 142 is asmooth function in the interval 30, 11 2 p21@24 for p [30, 14 and s . 1, and therefore Eq. 142 may be easilyintegrated by well-known methods. The highestprecision is obtained when the Gaussian quadratureis used. The integral is approximated by

e0

112p21@2 arcsin1x2 1 p

s 21x2 1 2p21@2

dx < oi51

N

wi

arcsin1xi2 1 p

s 21xi2 1 2p21@2

,

152

where xi are the 1scaled2 zeros of the Legendrepolynomial of order N and wi are the weights found,e.g., in Refs. 15 and 16. The error in approximation152 is limited by

emax1N2 #11 2 p2N11@21N!24

12N 1 12312N2!43M2N

<211 2 p21@2

5ŒN 311 2 p21@2

3N 42N

M2N, 162

where

M2N 5 max30,112r21@24

0 f 12N21x2 0 , f 1x2 5

arcsin1x2 1 r

s 21x2 1 2r21@2

.

A relative error of ,10210 is guaranteed when N 510, andN 5 14 gives an error of the order of 10220.The change in variables that we have proposed is

similar to that of Southwell.14 However, South-

Page 3: Numerical evaluation of the Luneburg integral and ray tracing

well’s change of variable, x 5 t 2 p, did not removethe singularity, but the singularity was removed in alater step by an integration by parts, which led to amuch more complicated integrand. Moreover thederivatives of the integrand in Ref. 14 are singular,which limits the accuracy of numerical integration.With our approach the integrand is smooth; conse-quently the precision is much higher.

2. Ray Tracing

In this section two ways to improve the speed of raytracing in the gradient-index media are proposed.First, instead of using the traditional ray equa-tions,3,7–9

d

ds 1ndr

ds2 5 =n, 172

or

d2r

dt25 n=n, dt 5 ds@n,

where ds denotes an element of length, we parameter-ize the rays differently.4,5 Assuming that the rayscan be represented unambiguously by function y 5y1x2, which is true for planar lenses and many otheroptical devices, we obtain

ny9

1 1 1 y8221

≠n

≠xy8 2

≠n

≠y5 0, 182

which can be integrated by a standard Runge–Kuttatechnique, provided that initial conditions y1x02 5 y0and y81x02 5 y08 are given. A particular advantage ofEq. 182 over Eq. 172 is that, instead of four equations offirst order, only two equations must be solved, whichdoubles the speed.Another way to increase ray-tracing speed is to use

an approximation for the refractive index. In previ-ous researchmuch attention was given to methods ofapproximation of w1p, s2,10–12,14 and then the refrac-tive index n1r2 itself was computed iteratively withNewton’s method during ray tracing.9 The ap-proach we take is to compute n1r2 accurately, usingmore precise but time-consuming formulas forw1p, s2,such as approximation 132 or 152, and then to approxi-mate the resulting index profile n1r2 for the ray-tracing stage. The most suitable tool for such anapproximation is based on Hermite cubic interpolat-ing splines.5 A particular advantage of the splinesis that they require no underlying model of therefractive-index profile, so that the form of theinterpolant is governed only by data. The splinecoefficients, whose number is equal to four times thenumber of interpolating knots ri, are computed byaccurate values of n1ri2, n81ri2, i 5 1, . . . , N and therequirement of interpolant smoothness. The maxi-mum error of approximation is emax1h2 5 constmax5 0n1IV21r2 0 6h4, where h is the distance between theknots. Therefore the precision of such an interpola-

tion can be easily controlled by taking an adequatenumber of knotsN. Once the spline coefficients arecomputed, the speed of the method depends only onhow quickly the algorithm locates the interval withthe necessary point, and this is of the order of log2N.For example, to achieve an error of 1028 only 100interpolation knots are necessary, which results inseven comparisons and seven arithmetic operationsper n1r2. Depending on the number of rays and thenumber of evaluation points, this approach increasesthe speed of ray tracing by more than an order ofmagnitude.

3. Conclusion

Three results have been presented that allow one toincrease the speed of ray tracing in gradient-indexmedia. First, by performing an appropriate changeof variable in the Luneburg integral, I removed thesingularity and obtained, in contrast to previousresearch, a smooth integrand. This then alloweduse of a Gaussian quadrature with only a few pointsto obtain a very high accuracy. Compared withmethods of evaluatingw1p, s2 through series represen-tations, our method requires fewer terms, and thecomputational cost of each term is lower.Second, to improve ray tracing, I used Hermite

spline interpolation of the resulting index profile n1r2instead of function w1p, s2. This significantly in-creased ray-tracing speed because the major job wasdone during the previous step and the precision iseasily controlled by an adequate number of interpola-tion knots. Third, I gave an alternative representa-tion of the ray equation, which is less general butadequate for many practical tasks including planaroptics and three-dimensional models with symmetry.Use of this equation doubles the speed of ray tracing,and the combination of all discussed techniquesincreases the speed by as many as 2 orders ofmagnitude.

References1. S. Doric and E. Munro, ‘‘General solution of the nonfull-

aperture Luneburg lens problem,’’ J. Opt. Soc. Am. 73,1083–1086 119832.

2. J. Sochacki and C. Gomez-Reino, ‘‘Nonfull-aperture Luneburglenses: a novel solution,’’Appl. Opt. 24, 1371–1373 119852.

3. W. H. Southwell, ‘‘Ray tracing in gradient-index media,’’ J.Opt. Soc. Am. 72, 908–911 119822.

4. G. Beliakov, ‘‘Reconstruction of optical characteristics ofwaveguide lenses by the use of ray tracing,’’ Appl. Opt. 33,3401–3404 119942.

5. G. Beliakov, ‘‘Study of mathematical model of the refractiveindex reconstruction of a smooth thin film waveguide by theuse of ray tracing,’’ Ph.D. dissertation 1Russian Peoples’Friendship University, Moscow, 19922, in Russian.

7. L. Montagnino, ‘‘Ray tracing in inhomogeneous media,’’ J.Opt. Soc. Am. 58, 1667–1668 119682.

8. A. Sharma, D. V. Kumar, and A. K. Ghatak, ‘‘Tracing raysthrough graded-index media: a new method,’’ Appl. Opt. 21,984–987 119822.

9. S. Doric and E. Munro, ‘‘Improvements of the ray tracethrough the generalized Luneburg lens,’’ Appl. Opt. 22,443–445 119832.

10. J. Sochacki, D. Rogus, and C. Gomez-Reino, ‘‘Paraxial design-

1 March 1996 @ Vol. 35, No. 7 @ APPLIED OPTICS 1013

Page 4: Numerical evaluation of the Luneburg integral and ray tracing

ing of planar waveguide. Variable-index focusing elements:Part 1. Lenses of circular symmetry,’’ Fiber Integr. Opt. 8,121–127 119892.

11. J. Sochacki, ‘‘Functional approach to the Luneburg’s integralfor the planar Luneburg lenses design,’’ IEEE J. LightwaveTechnol. LT-3, 684–687 119852.

12. J. Sochacki, J. R. Flores, R. Staronski, and C. Gomez-Reino,‘‘Improvements in the computation of refractive-index pro-files for the generalized Luneburg lens,’’ J. Opt. Soc. Am. A 8,1248–1255 119912.

1014 APPLIED OPTICS @ Vol. 35, No. 7 @ 1 March 1996

13. E. Colombini, ‘‘Index-profile computation for the generalizedLuneburg lens,’’ J. Opt. Soc. Am. 71, 1403–1405 119812.

14. W. H. Southwell, ‘‘Index profiles for generalized Luneburglenses and their use in planar optical waveguides,’’ J. Opt.Soc. Am. 67, 1010–1014 119772.

15. W. H. Press, B. P. Flannery, S. A. Teukolsky, and W. T.Vetterling, Numerical Recipes 1Cambridge U. Press, Cam-bridge, UK, 19892, p. 122.

16. M. Abramowitz and I. A. Stegun, Handbook of MathematicalFunctions, Vol. 55 of the Appl. Math. Ser. 1Dover, New York,19722, p. 916.