10
APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released 02.12.2014 ; Revised 25.10.2015 * Correspondence: [email protected] Abstract Ray path in graded-index medium is curved and can be solved numeri- cally by using eikonal equation, which is the starting point of geometrical optics. In this report, derivation of eikonal equation, the relation be- tween eikonal equation and Fermat’s principle is shown. Moreover, general ray equation for graded-index medium is derived from eikonal equation. Then, ray path can be realized more efficiently and accurately by solving the ray equation with Runge-Kutta method. Keywords: ray tracing; graded-index medium Eikonal equation The eikonal equation is derived from Maxwell equation with an approxi- mation of geometrical optics [1]. We consider the time-harmonic field as ansatz which fulfills the Maxwell equation in inhomogeneous medium: ( E(r,t) = E(r)e -iωt = ˜ E 0 (r)e i( R r r 0 k(r 0 )·dr 0 -ωt) H(r,t) = H(r)e -iωt = ˜ H 0 (r)e i( R r r 0 k(r 0 )·dr 0 -ωt) (1) The effect of medium is not dependent on time, so the phase part which depends on time is canceled in Maxwell equation. E(r) and H(r) can be rewritten as: ψ(r): = R r r0 k(r 0 ) · dr 0 = k 0 R r r0 n(r 0 ) ˆ k(r 0 ) · dr 0 = k 0 R r r0 n(r 0 ) ˆ k(r 0 ) · dr 0 ds ds = k 0 R r r0 n(r 0 )ds = k 0 L(r) L(r) is optical path length or eikonal. Some literature denotes it as S(r) [1], but we use L(r) as the denotation to avoid the confusion with Poynting. E(r) = ˜ E 0 (r)e (r) H(r) = ˜ H 0 (r)e (r) (2) In Eq. (2), k 0 = 2π λ 0 is quite larger compare with S(r). Then we plug the ansatz function and material equations into Maxwell equations and achieve the expressions as follows: ˜ E 0 (r) · ψ(r) = i( ˜ E 0 (r) · ln (r)+ · ˜ E 0 (r)) ˜ H 0 (r) · ψ(r) = i( ˜ H 0 (r) · ln μ(r)+ · ˜ H 0 (r)) ψ(r) × ˜ H 0 (r)+ k 0 (r) ˜ E 0 (r) = i× ˜ H 0 (r) ψ(r) × ˜ E 0 (r) - k 0 μ(r) ˜ H 0 (r) = i× ˜ E 0 (r) (3) Till now, everything is rigorous. In the optical medium (μ(r) μ 0 ), we apply the geometric field approximation: 1 | ˜ V 0 (r)| ˜ V 0 (r) ∂x j << ∂ψ(r) ∂x j 1 |n(r)| ∂n(r) ∂x j << ∂ψ(r) ∂x j (4) 1

Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

APPLIED COMPUTATIONAL OPTICS GROUP

Research Note

Ray tracing in graded-index mediumHuiying Zhong*, Site Zhang, Frank Wyrowski

Released 02.12.2014 ; Revised 25.10.2015

*Correspondence:[email protected]

AbstractRay path in graded-index medium is curved and can be solved numeri-cally by using eikonal equation, which is the starting point of geometricaloptics. In this report, derivation of eikonal equation, the relation be-tween eikonal equation and Fermat’s principle is shown. Moreover,general ray equation for graded-index medium is derived from eikonalequation. Then, ray path can be realized more efficiently and accuratelyby solving the ray equation with Runge-Kutta method.

Keywords: ray tracing; graded-index medium

Eikonal equation

The eikonal equation is derived from Maxwell equation with an approxi-mation of geometrical optics [1]. We consider the time-harmonic field asansatz which fulfills the Maxwell equation in inhomogeneous medium:{

E(r, t) = E(r)e−iωt = E0(r)ei(∫rr0k(r′)·dr′−ωt)

H(r, t) = H(r)e−iωt = H0(r)ei(∫rr0k(r′)·dr′−ωt)

(1)

The effect of medium is not dependent on time, so the phase part whichdepends on time is canceled in Maxwell equation. E(r) and H(r) canbe rewritten as:

ψ(r) : =∫ rr0k(r′) · dr′

= k0∫ rr0n(r′)k(r′) · dr′

= k0∫ rr0n(r′)k(r′) · dr

dsds

= k0∫ rr0n(r′)ds = k0L(r)

L(r) is optical path lengthor eikonal. Someliterature denotes it asS(r) [1], but we use L(r)as the denotation to avoidthe confusion withPoynting.

{E(r) = E0(r)eiψ(r)

H(r) = H0(r)eiψ(r)(2)

In Eq. (2), k0 = 2πλ0

is quite larger compare with S(r). Then we plug

the ansatz function and material equations into Maxwell equations andachieve the expressions as follows:

E0(r) ·∇ψ(r) = i(E0(r) ·∇ ln ε(r) + ∇ · E0(r))

H0(r) ·∇ψ(r) = i(H0(r) ·∇ lnµ(r) + ∇ · H0(r))

∇ψ(r)× H0(r) + k0ε(r)E0(r) = i∇× H0(r)

∇ψ(r)× E0(r)− k0µ(r)H0(r) = i∇× E0(r)(3)

Till now, everything is rigorous. In the optical medium (µ(r) ≡ µ0),we apply the geometric field approximation:

1|V 0(r)|

∂V 0(r)∂xj

<<∂ψ(r)∂xj

1|n(r)|

∂n(r)∂xj

<<∂ψ(r)∂xj

(4)

1

Page 2: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

with V 0 is E0(r) or H0(r).Eq. (3) is reduced to:

E0(r) ·∇ψ(r) = 0

H0(r) ·∇ψ(r) = 0

∇ψ(r)× H0(r) + k0ε(r)E0(r) = 0

∇ψ(r)× E0(r)− k0µ0H0(r) = 0

(5)

Combine the third and fourth equations in Eq. (5), the Scalar Eikonal Equationis derived: Some literature expresses

the eikonal equation as:

(∇L(r))2 = n2(r)

which is equivalent toEq. (6)

(∇ψ(r))2 = k20n2(r) (6)

The time averaged Poynting vector is:

< S(r) > = 12<[E(r)×H∗(r)]

= 12µ0k0

|E0(r)|2∇ψ(r)(7)

Eq. (7) gives the direction of energy flux s(r), which is similar with thatof ∇ψ(r). This is the V ectorial Eikonal Equation:

∇ψ(r) = k0n(r)s(r) (8)

Ray equation for graded-index medium

From the vectorial eikonal equation (8), ray’s direction is the direction ofenergy flux. In graded-index medium, the relation of position r, directions(r) and arc length of ray path s(r) is shown in Fig. 1, which can beformulated as:

s(r) =dr

ds(9)

Plug Eq. (9) into vectorial eikonal equation (8), and differentiate bothside with respect to s, we obtain:

dds

[∇ψ(r)] = k0dds

[n(r)drds

]

= drds

1dr

[∇ψ(r)]

= 1k0n(r)

[∇ψ(r)] · {∇ · [∇ψ(r)]}

= 12k0n(r)

∇[∇S(r)]2

= k02n(r)

∇n2(r) = k0∇n(r)

(10)

Then we obtain the Ray Equation for Graded− Index Media:

d

ds[n(r)

dr

ds] = ∇n(r) (11)

In homogeneous medium, n is not dependent on r, so d2rds2

= 0.

The relation between r and s is r = sa + b, which means the raypropagate along direction a and go through point b. Therefore, the rayis a straight line in homogeneous medium.

2

Page 3: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

Figure 1: The curve represents a ray path, with r denotes the positionand s denotes the arc length of ray path

Algorithm of ray tracing in graded-index medium

As we discussed above, the vectorial eikonal equation and ray equationshould be fulfilled everywhere in graded-index medium. Based onthese two equations, we explore two approaches to do the ray tracingin graded-index medium.

Approach based on the vectorial eikonal equation

The idea of this approach is to discretize the ray path curve, and eachdiscrete part can be approximated as a straight line, as shown in Fig. 3.The vectorial eikonal equation (8) is used as a boundary condition,which means it is used to calculate the direction s(r) of the neighbordiscrete part. The initial condition of an arbitrary ray is known as(r0, s0(r), ψ(r0)). We calculate the (rN , s(rN ), ψ(rN )) along such aray, as shown in Fig. 3. Eq. (12) shows the step how to calculate(ri+1, s(ri+1), ψ(ri+1)) from (ri, si(ri), ψ(ri)).(r, s(r), ψ(r))

Figure 2: The calculated rayand assistant rays

rji+1 = rji + si(r0i ) ·

zi+1 − zisiz(r

0i )

ψ(rji+1) = ψ(rji ) + k0n(rji ) + n(rji+1)

2 · |rji+1 − rji |

si+1(r0i+1) =

ψ(r3i+1)− ψ(r1i+1)

2k0∆r · n(r0i+1)

ψ(r2i+1)− ψ(r4i+1)

2k0∆r · n(r0i+1)√1− s2(i+1)x − s

2(i+1)y

with j = 0, 1, 2, 3, 4

(12)In this algorithm, the ray direction s(r) is calculated by finite dif-

ference method, which requires the calculation of four assistant rays

3

Page 4: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

Figure 3: Illustration of approach based on the vectorial eikonal equation

around. In Eq. (12), r0i denotes the ray to be calculated and r1i , r2i , r

3i , r

4i

denotes the assistant rays, as shown in Fig. 2.The flow chart is shown in Fig. 4. The advantage of this approach is

helpful for understanding and easy to construct, while the disadvantageis numerically inefficient.

Approach based on the ray equation

From the ray equation (11), relation between position r and refractiveindex n(r) is explicit. To solve such differential equation, we use theRunge-Kutta method till the fourth order(RK4) [2,3].

Then we define three assistant variables: the path parameter t, theoptical ray vector T (r) and refractive index parameter D(r).

t =∫ dsn

T (r) = drdt

= n(r) · s(r)

D(r) = n(r)∇n(r)

(13)

Plug Eq. 13 into Eq. (11) and it can be rewritten as a first-orderdifferential equation:

dT (r)

dt= D(r) (14)

Differential equation (14) can be solved by RK4, which is a well knownnumerical method to solve first-order differential equation, e.g.Eq. (14).

The discretization is done along arc length of ray path ti, with i =0, 1, 2, ...N . For each ti, the related ri is calculated. The initial conditionof an arbitrary ray is known as (r0, s0(r), ψ(r0)). We calculate the(rN , sN (r), ψ(rN )) along such a ray, as shown in Fig. 5. Here we showthe steps how to calculate (ri+1, si+1(r), ψ(ri+1)) from (ri, si(r), ψ(ri))

4

Page 5: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

Quantize the medium along z-axis

into N slices

{𝑧0, 𝑧1, … 𝑧𝑁}

(𝒓0, 𝒔 0(𝒓0 , 𝜓(𝒓0

In the slice [𝑧𝑖 , 𝑧𝑖+1],(𝑖 ∈ [0,𝑁] ,

In addition to such ray , we also

calculate 4 assistant rays around it

(𝒓𝑁 , 𝒔 𝑁(𝒓𝑁 , 𝜓(𝒓𝑁

Figure 4: Illustration of approach based on the vectorial eikonal equation

5

Page 6: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

Figure 5: Illustration of approach based on the ray equation

by using RK4, as shown in Eq. (15) and (16):

A = ∆tD(ri)

B = ∆tD(ri + ∆t2 T (ri) + 1

8∆tA)

C = ∆tD(ri + ∆tT (ri) + 12∆tB)

T (ri+1) = T (ri) + 16(A+ 4B +C)

(15)

ri+1 = ri + ∆t[T (ri) + 1

6(A+ 2B)]

s(ri+1) =T (ri+1)n(ri+1)

ψ(ri+1) = ψ(ri) + k0∆t2 [n2(ri+1) + n2(ri)]

−k0∆t2

6 [D(ri+1)T (ri+1)−D(ri)T (ri)]

(16)

Taking the advantage of advanced numerical calculation method RK4,this approach is quite efficient and accurate. The flow chart is shown inFig. 6.

Examples

In this section, we will show two examples: (1) 2D-example of validitytest; (3) 3D-example.

Validity test

The first example is used to show the validity of the two ray tracingapproaches. The results from the two ray tracing approaches arecompared with those of rigorous approach, which is the Maxwell solver.The test example is as follows:

6

Page 7: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

Equidistant sampled along t

{𝑡0, 𝑡1, … 𝑡𝑁}

(𝒓0, 𝒔 0(𝒓0), 𝜓(𝒓0))

In the step [𝑟𝑖, 𝑟𝑖+1],(𝑖 ∈ [0,𝑁]),

(𝒓𝑁 , 𝒔 𝑁(𝒓𝑁), 𝜓(𝒓𝑁))

Figure 6: Illustration of approach based on the ray equation

7

Page 8: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

Figure 8: Normal incidence

• The refractive index of the graded-index medium is: n(ρ) =n0(1 + aρ2), with n0 = 1.6289, a = −2.36× 10−5 1/m2

• Incidence:

– Normal incidence and inclined incidence (10◦) are tested.

– The parallel rays with 150 µm diameter input from air to thegraded-index medium

As shown in Fig.8 and 9, we directly overlap the ray paths and thefield distribution from rigorous approach. For both cases, the two raytracing approaches show identical results and they are perfect overlapwith each other. Moreover, the results fit to the field distribution verywell. Therefore, the validity of these two approaches are confirmed.However, one should notice one thing that the approach which based onthe ray equation is much more efficient. That is because the analyticalfitting curve between neighbor points are calculated and the step sizecan be longer. But in the approach which is based on the vectorialeikonal equation, straight lines between neighbor points are assumedand it requires a short step length. Consequently, the approach whichis based on the ray equation and takes the advantage of RK4 is chosenas the better method for ray tracing in graded-index medium.

Figure 7: Refractive index ofthe inhomogeneous medium.n(r) doesn’t change along z-axis.

3D example

A simple example is given here, a paraxial beam is propagated to agraded-index medium, whose refractive index is shown in Fig. 7. Theray path within the inhomogeneouexas medium is shown in Fig. 10

8

Page 9: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

Figure 9: Inclined incidence

Figure 10: Ray path in inhomogeneous medium

9

Page 10: Ray tracing in graded-index medium - Projects · APPLIED COMPUTATIONAL OPTICS GROUP Research Note Ray tracing in graded-index medium Huiying Zhong*, Site Zhang, Frank Wyrowski Released

Conclusion

Eikonal equation is the basics of geometrical optics. Both scalar andvectorial eikonal equations are derived in this report. Starting from thevectorial eikonal equation, the ray equation in the graded-index mediumis derived.

Two approaches of ray tracing in the graded-index medium areexplored: (1) approach which is based on the vectorial eikonal equa-tion; (2) approach which is based on the ray equation in graded-indexmedium.

From the validity test, we know that both approaches work properly.However, approach (2) is more efficient than (1), because it has donethe analytical curve fitting between neighbor steps by taking advantageof the Runge-Kutta method (RK4).

Bibliography

[1] Max Born and Emil Wolf, editors. Principles of optics. CambridgeUniversity Press, 1999.

[2] Anurag Sharma, D. Vizia Kumar, and A. K. Ghatak. Tracing raysthrough graded-index media: a new method. Appl. Opt., 21(6):984–987, Mar 1982.

[3] Anurag Sharma. Computing optical path length in gradient-indexmedia: a fast and accurate method. Appl. Opt., 24(24):4367–4370,Dec 1985.

10