Chapter 5

Ray Tracing

This chapter describes a graphical method for working out where images form, known as ray tracing. Ray tracing means we trace the path of individual rays of light, rather than bundles of diverging or converging rays. Ray tracing only looks at what happens to a few carefully selected rays that are quite easy to trace through a lens.

fig1a
Figure 1(a). A bundle of parallel rays which enter a positive lens are all bent so they pass through the (image) focal point of the lens. However, each ray travels independently from the others, so we can remove all the rays but one .
fig1b
Figure 1(b). The single ray that remains leads to the first ray tracing rule: a single ray of light which enters the lens parallel to the optic axis (the dashed line) is refracted so that it passes through the image focal point.

The first ray tracing rule is shown in Figure 1. A bundle of parallel rays hitting a positive lens will all pass through the (image) focal point of the lens. Each ray travels independently from the others, so if we remove all but one ray ( Figure 1(b)), we have a much simpler situation, which can be summarized as the first ray tracing rule:

Rule 1: Any ray of light which is parallel to the optic axis is refracted so it passes through the image focal point of the lens.

(This rule just says in words what Figure 1(b) shows pictorially. You're better off remembering what Figure 1(b) looks like than remembering the words in Rule 1. This is true for the other rules as well.)

Next look at Figure 2. Rays of light which leave the (object) focal point are refracted so they emerge from the lens in parallel with the optic axis (see Chapter 1). Again, each ray of light is refracted independently from all the others, so we can remove all but one ray.

fig2a
Figure 2(a). Rays of light coming from the (object) focal point leave the lens in parallel. However, each ray travels independently from the others, so we can remove all the rays but one .
fig2b
Figure 2(b). The single ray that remains starts from the focal point, but the lens doesn't care where it starts, only its direction. So this leads to the second rule...
fig2b
Figure 2(c). Any ray of light which passes through the object focal point of a lens is refracted so it comes out parallel to the optic axis.

Looking at this isolated ray leads to our second ray-tracing rule :

Rule 2: Any ray of light which passes through the object focal point of a lens is refracted so it comes out parallel to the optic axis.

Notice that Rule 2 says that the ray doesn't have to start at the focal point, it just has to pass through it. That's because if the ray passes through the focal point, by the time it hits the lens it is actually going in the same direction as a ray that started at the focal point. So the lens will treat it in the same way.

These two rules are enough to work out where an image is formed, as shown in Figure 3. Here, an object (an upright arrow) is placed to the left of a positive lens. Although many rays leave each point of the object, it is enough to consider just the two rays that follow the ray tracing rules. The first ray is parallel to the optic axis, so it must obey Rule 1. Thus, it is refracted so it goes through the image focal point of the lens (click the rule 1 checkbox to see it). The second ray passes through the object focal point of the lens, so it must obey Rule 2. Thus, it is refracted to emerge parallel to the optic axis (click the rule 2 checkbox to see it). The two rays intersect at the point where the image of the arrowhead is formed.

Figure 3. Using the ray-tracing rules to decide where a point on an object forms a sharp image. The three rules can be turned on and off using the check boxes in the lower left corner. The white circles show the focal points of the lens. The object is a white arrow and the image is a bluish arrow.

The image only appears when two or more rules are on, because the image is located where the two rays from those rules intersect.

We assume that all the other light rays leaving the arrowhead will also converge to this point (which in fact they do). The arrowhead on the object was above the optic axis, and the image of the arrowhead is formed below the optic axis. This means that the image is formed upside down (inverted) relative to the object, and that is always the case for a real image formed by a positive lens. Note that in drawing the entire image in Figure 3, we’ve assumed two more things (both of which happen to be true): first, that vertical objects produce vertical images, and second that a point on the optic axis produces an image point on the optic axis. These assumptions let us draw the rest of the image once we know where the arrow tip is. (We could ray trace every point on the object, but it would be tedious and would lead to the same result.)

There is a third ray tracing rule, which comes from the other two:

Rule 3 (Thin lenses only): Any ray of light which passes through the centre of a lens is not refracted and continues straight and undeviated.

This rule can be made visible in Figure 3 by clicking the "rule 3" checkbox. However, rule 3 can only be used on thin lenses, because it only works when the two focal points are equal distances from the lens. It doesn’t work with refracting surfaces, because the two focal points are not the same distance from the surface.

One Last Thing...

If you drag the arrowhead around in Figure 3 you might notice that sometimes the rays from Rule 1 or Rule 2 miss the lens completely (e.g. when the arrow-object is very tall). When we use the ray-tracing rules, we are allowed to imagine the lens as being much wider or taller than it really is. The imaginary wider lens is shown in Figure 3 as a dashed line going through the actual lens.

Linear Magnification

“Linear” magnification compares the height of the image to the height of the object. Rule 3 can be used to work out the linear magnification produced by thin lenses. Figure 4 shows an object with height \( H \) placed at a distance \( d_{obj}=1/V_{in} \) from a positive lens. An image is created with height \( h \) at a distance of \( d_{img}=1/V_{out} \) from the lens.

fig4
Figure 4. The triangles and distances used to derive the linear magnification of a lens.

The linear magnification is simply the image height divided by the object height, \( h/H \). We can work out what this is as follows.

A light ray (obeying Rule 3) is drawn from the top of the object, passing through the optic centre, to arrive at the top of the image. There are two triangles in the diagram. The first (shaded in green) has a height of \( H \) (which is the object height) and a base equal to the object distance.

The second triangle (shaded in red) is made from the optic axis, the image, and the ray obeying Rule 3. It has a height of \( h \) (which is the image height) and a base equal to the image distance. These two triangles are similar, so they have the same shape but different sizes. That means the ratio of height to base is the same for both triangles, so

\[ \frac{h}{\text{image distance}} = \frac{H}{\text{object distance}} \]

Cross-multiplying gives the linear magnification as

\[ \frac{h}{H} = \frac{\text{image distance}}{\text{object distance}} \]

In most imaging systems (like the eye or a camera) the image distance is much less than the object distance, so the linear magnification is very small.

The Sign Convention for Magnification.

For a real image, the object distance is negative and the image distance is positive. Thus \( M = (\text{image distance})/(\text{object distance}) \) is negative, and so we have a negative magnification. What does this mean?

Because \( M \) is also equal to \( h/H \), it means that one of the heights, \( h \) or \( H \), is positive and the other is negative. So height also has a sign convention: When we measure heights, we start from the optic axis. Measurements in the upwards direction are positive, and measurements in the downwards direction are negative. So in Figure 4, the object height is positive and the image height is negative. When the image height is the opposite sign to the object height, the image is inverted.

In general,

For example, a magnification of \( -0.5 \) means that the image is half the size of the object, and inverted.

Example 1

An object is placed 450mm to the left of a lens with power \( +4 \)D. What is the image magnification?

Answer

We need to work out the image distance.

Negative magnification means the image is inverted. The size of the magnification (1.25) means the image is 25% larger than the object.

Example 2

In the above example, if the object is 10cm tall, how big is the image?

Answer

To get the image size, we multiply the object size by the magnification.

The minus sign tells us that the image is inverted, and 12.5cm tall.

Example 3

An object is placed 60cm to the left of a lens with power \( -10 \)D. What is the image magnification? (Hint: the magnification formula for positive lenses works fine for negative lenses too.)

Answer

We need to work out the image distance.

The magnification is positive so the image is right way up, and only about 15% of the size of the object.

Ray Tracing Virtual Images.

The ray tracing rules can also be used when a positive lens creates a virtual image. However, there is a little problem with Rule 2 in this case. To create a virtual image with a positive lens, the object has to be between the object focal point and the lens. Any ray from the object going through the object focal point is then travelling in the wrong direction to hit the lens.

However, if a ray of light is travelling so that it looks like it came from the object focal point when it hits the lens, it will behave exactly the same as one which really did – only the direction of the ray matters, not where it starts. So we can amend Rule 2 to read

Rule 2 (amended): Any ray of light which is travelling in the same direction as a ray coming from the object focal point is refracted to emerge parallel to the optic axis.

Ray-tracing a virtual image from a positive lens is shown in Figure 5 . Since the two rays diverge, they don’t intersect in the way that the rays did in Figure 3 . To find the image, what we have to do is follow the rays backwards (dashed lines, called virtual rays) until the virtual rays intersect. This is where the virtual image is.

Figure 5. Like Figure 3 but for a virtual image. Rule 2 is shown in its amended form. The dashed line between the object focal point and the tip of the object shows that the ray of light coming from the tip of the object is in the same direction as a ray of light coming from the focal point.

The image is formed at the intersection of virtual rays. To see these virtual rays, you must click the check-box in the lower right corner. Also, the image only appears when two or more rules are on, because the image is located where two virtual rays intersect.

Ray Tracing with Negative Lenses

Negative lenses change the rules slightly. If we send parallel light into a negative lens, it is diverged (top half of Figure 6). The rays leaving the lens are diverging as if they came from the image focal point. As before, all these rays are independent of one another, so we can throw away all but one of them Figure 6b to get a ray-tracing rule:

Rule 1 (Negative): Any ray of light parallel to the optic axis which enters a negative lens is refracted so that it appears to have come from the image focal point.
fig6a
Figure 6(a). A bundle of parallel rays which enter a negative lens are all diverged so they appear to come from the (image) focal point of the lens. However, each ray travels independently from the others, so we can remove all the rays but one
fig6b

The next ray tracing rule is shown in Figure 7. Here, rays of light that are converging towards the object focal point are refracted to emerge in parallel. Again, the rays all act independently, so we can throw away all but one of them ( Figure 7(b)) to get another ray tracing rule:

Rule 2 (Negative): Any ray of light travelling towards the object focal point of a negative lens is refracted to become parallel to the optic axis.
fig7a
Figure 7(a). A bundle of rays converging to the (object) focal point is diverged to become parallel by a negative lens. However, each ray travels independently from the others, so we can remove all the rays but one .
fig7b
Figure 7(b). The single ray of light here leads to the second rule for ray-tracing negative lenses: Any ray of light travelling towards the object focal point of a negative lens is refracted to become parallel to the optic axis.

Finally, Rule 3 doesn’t change:

Rule 3: (Thin lenses only): Any ray of light which passes through the centre of a lens is not refracted and continues straight and undeviated.

These rules are shown in action in Figure 8. As with Figure 5, the rays leaving the lens are diverging, so they can’t intersect. What we have to do is trace them backwards until the meet each other. The virtual image is at that point.

Figure 8. Using the ray-tracing rules to decide where a negative lens forms a sharp image of a point on an object. The three rules can be turned on and off using the check boxes in the lower left corner. The white circles show the focal points of the lens. The object is a white arrow and the image is a bluish arrow.

The image is formed at the intersection of virtual rays. To see these virtual rays, you must click the check-box in the lower right corner. Also, the image only appears when two or more rules are on, because the image is located where two virtual rays intersect . (The virtual ray for Rule 3 overlaps the actual ray.)

Linear Magnification with Virtual Images.

Chapter 2 stated that the virtual image created by a negative lens is smaller than the object, and a virtual image created by a positive lens is larger than the object. The linear magnification equation above lets us prove that.

Linear magnification is

\[ M = \frac{\text{image distance}}{\text{object distance}} \]

For a negative lens, the image is always closer than the object, so (image distance) < (object distance), and so \( M \) is always less than one and the image is always smaller than the object.

Example

If the object distance is \( -0.5\text{m} \) and \( F=-3 \), then

Notice that this is positive magnification, which means the virtual image is the same way up as the object.

When a positive lens creates a virtual image, the image is always further away than the object, and this means \( M \) is greater than one, so the image is always larger than the object.

Example

If the object distance is \( -0.2\text{m} \) and \( F=+2\text{D} \), then

A virtual image created by a negative lens is smaller than the object because it is closer, and a virtual image created by a positive lens is larger than the object because it is further away.