A ray at an interface

Medium 1 and medium 2 are two homogeneous media with a common interface.  The index of refraction of medium 1 is n1 and the index of refraction of medium 2 is n2.  A ray, incident in medium 1, strikes the interface at a point P.  Let n be the unit vector normal to the interface at P, pointing from medium 1 to medium 2.  Let s denote the unit vector pointing in the direction of propagation of the ray in medium 1, and let s make an angle q1 with n.  Let t be a unit vector tangential to the interface in the plane containing both s and n.

In terms of its components along the perpendicular directions defined by n and t we may write

s = cosq1n + sinq1t

or

n1s = n1cosq1n + n1sinq1t.

(equation 1)

At the interface the ray may be refracted or reflected.  Let us first consider the refracted ray.  Let s’ denote the unit vector pointing in the direction of propagation of the refracted ray; s’ make an angle q2 with n.

In terms of its components along the perpendicular directions defined by n and t we may write

s’ = cosq2n + sinq2t

or

n2s’ = n2cosq2n + n2sinq2t.

The law of refractions states that n1sinq1 = n2sinq2.

Therefore

n2s’ = n2cosq2n + n1sinq1t.

(equation 2)

Combining equations 1 and 2 yields

n2s’ = n1s + (n2cosq2 - n1cosq1)n.

(equation 3)

A ray at a spherical interface

Now let us consider a spherical interface.  Let the radius of curvature be |R|, and let the center of curvature C lie on the z-axis of our coordinate system.  Let the vertex V be the point where the surface intersects the z-axis.  Let us consider R to be positive if the z-coordinate of C is greater than the z-coordinate of V and negative if the z-coordinate of C is less than the z-coordinate of V.

The general relation between s and s’ for the refracted ray is equation 3,

n2s’ = n1s + (n2cosq2 - n1cosq1)n.

This is a vector equation.  In terms of the components along the axes of our coordinate system we may write

n2sx’ = n1sx + (n2cosq2 - n1cosq1)nx,

n2sy’ = n1sy + (n2cosq2 - n1cosq1)ny,

n2sz’ = n1sz + (n2cosq2 - n1cosq1)nz.

From geometry we have

nx = -x/R, ny = -y/R, nz = z/|R| = (R2 - x2 - y2)½/|R|.

At the interface we therefore have

n2sx’ = n1sx - (n2cosq2 - n1cosq1)x/R,

n2sy’ = n1sy - (n2cosq2 - n1cosq1)y/R,

n2sz’ = n1sz + (n2cosq2 - n1cosq1)(R2 - x2 - y2)½/|R|.

At the interface we also have

x’ = x,

y’ = y.

Since s·n = cosq1, we can determine cosq1 in terms of the Cartesian components of s and n and cosq2 from the law of refraction.

After refraction at the interface, rays will travel in a straight line along the direction defined by s’ until they meet another interface.  This linear propagation may be described by

x2’ = x1’ + (z2’-z1’)sx’/sz’,

y2’ = y1’ + (z2’-z1’)sy’/sz’.

These are the exact ray-tracing equations for refraction at a spherical interface.

Paraxial optics

Assume an optical axis can be defined, and all light rays and all surface normals make small angles with this axis.  Such rays are called paraxial rays.  Let us now call q1 and q2 the angles a ray makes with the optical axis.  If q1 and q2 are small, then cosq1 @ 1, cosq2 @ 1, and sinq1 @ q1, sinq2 @ q2For paraxial rays sz = s cosq1 @ 1, and sz’ = s’cosq2 @ 1.

The ray tracing equations then become

n2sx’ = n1sx - (n2 - n1)x/R,

n2sy’ = n1sy - (n2 - n1)y/R,

for refraction at the spherical surface, and

x2’ = x1’ + (z2’ - z1’)sx’,

y2’ = y1’ + (z2’ - z1’)sy’.

for propagation through the homogeneous medium.

The equations for the projections of the rays on the xz-plane and on the yz-plane decouple and the projections can be treated independently.

Let us concentrate on the projections in the xz-plane.  These projections behave as if the rays were actually lying in that plane.  Rays that lie in a single plane containing the z-axis are called meridional rays.  We now have a two-dimensional situation.

For refraction at a spherical surface we have

n2sx’ = n1sx - (n2 - n1)x/R,

x’ = x

and for propagation through a homogeneous medium we have

x2’ = x1’ + (z2’ - z1’)sx’.

But

sx= s sinq1 @ q1, sx’ = s sinq2 @ q2.

Therefore we can write

n2q2 = n1q1 - (n2 - n1)x/R,

and

x2’ = x1’ + (z2’ - z1’)q2.

These equations can be written in matrix form:

We have

for refraction, and

for propagation.

These transformations can be combined to give the overall transformation through several refracting and transmitting elements.

Assume a ray originates at (x1, z1) in medium 1.  It makes an angle q1 with the z-axis.  We define

The ray propagates in medium 1 towards (x2, z2).  The translation matrix T12 is given by

and the ray’s new coordinates are

.

(Note that the determinant of the translation matrix T12 is 1.)

At z2 the ray encounters a spherical interface between medium 1 and medium 2 and is refracted.  Its coordinates become

or

r2’ = Rr2 = RT12r1.

Here 

.

(Note that the determinant of the refraction matrix R is 1.)

The ray then propagates in medium 2 towards (x3’, z3’). We have

or

r3’ = T23r2’ = T23RT12r1 = Mr1.

M is the system matrix.  Its determinant is 1, since det(AB) = det(A) det(B).

Matrix multiplication yields M.

Image formation

To form an image, all rays leaving the point P at (x1, z1) must arrive at the point P’ at (x3’, z3’), independent of q1.  This means that x3’ must be independent of q1, or

.

This can be rearranged to yield

.

(equation 4)

Here P is called the power of the interface.

If z1 goes to –infinity, we have

.

Similarly, if z3 goes to infinity, we have

.

The distances f’ and f are called the image and object focal length, respectively.

Lateral magnification

We define the lateral magnification Mx through the equation

x3' = Mxx1.

This yields

.

Using equation (4) we obtain

.

Problem:

A glass rod of index n2= 1.5 has a hemispherical convex surface of radius R = 6 cm on one end as in in the figure below.  A ray makes an angle q1 equal to 0.1 radians with the plane PP at a height of x1 = 1.6 cm from the optical axis.  The plane PP is 8 cm to the left of the vertex V.  Find the height of the ray x2 and its direction q2 at the plane QQ 9 cm to the right of V.

Solution:

In this problem n2 = 1.5, n1 = 1, n2 - n1 = 0.5, R = 6 cm, z2 - z1 = 8 cm, z3 - z2 = 9 cm, x1 = 1.6 cm, q1 = 0.1 radians.  Therefore

,

x3 = 1.8 cm, q2 = -0.1/1.5 = -0.067 radians.

Problem:

Find the image and object focal length of the above system.

Solution:

The image focal length is f' = n2R/(n2 -n1) = 18 cm and the object focal length is f = n1R/(n2 -n1) = 12 cm.

Problem:

For an object located 18 cm to the left of V, find the image distance.

Solution:

1/18 + 1.5/(z3 - z2) = 0.5/6,  (z3 - z2) = 54 cm.

We have a real image.

Problem:

For an object located 6 cm to the left of V, find the image distance.

Solution:

1/6 + 1.5/(z3 - z2) = 0.5/6,  (z3 - z2) = -18 cm.

We have a virtual image.

Exercise:

Explore ray tracing using Microsoft Excel.  The linked spreadsheet traces rays across a single spherical interface in the paraxial approximation using matrix multiplication.  It contains a macro, which increments the launch angle for 7 rays.  The results of the calculations are plotted.  The object position, the radius of the interface, and the indexes of refraction can be chosen by the user.  The object position can be on either side of the interface.  Please explore the spreadsheet and feel free to modify it.