Here I'd like to walk-through an example showing you how the Lagrange invariant changes through a system. Which is to say, notch change because it's invariant. And to potentially help understand the Lagrange invariant a little more, maybe, introduce a concept called phase space. It's just another way of sort of visualizing the spacial and angular content of a bundle of light, of a set of rays moving through a system. And this is really wrapping up the concepts that we are teaching in this module that using the marginal and chief ray, allows you to understand how the ensemble of rays moves the system. Because the marginal and chief ray bound the angular and spacial extent of the object and image. They can change character through the system. But at the object and image planes, the marginal tells you the angular extent, the chief tells you the field or the spacial extend of the system. So here's a system, it's telecentric in object space because I've put my aperture stop at the back focal plane of the lens. It's not telecentric in image space because it would take a second lens to do that. I have drawn in the marginal ray and the chief ray, of course the chief ray goes through the center of the aperture stop. And it happens to be parallel to the axis out here in object space because it's telecentric in object space. I'm imagining I have some sort of source here, let's say this is like CCD, sorry, LCD, liquid crystal display. And I have a thousand pixels that are five microns on the side. And so I have a five millimeter total field of view here in object space. So I can go ahead and calculate my Lagrangian invariant. Of course, the object and image spaces, one of these terms is always zero. So that's convenient and that's because, remember bar represents chief ray. The height of the marginal ray, y here, is always zero at object and image spaces. So this second term goes away. So from the first term of the angle of my marginal ray happens to be one-tenth and that set by where my aperture stop is and its diameter. And the height of the chief ray is half of the 2.5 millimeter field of view. So let's check and see if that makes sense because I get a Lagrange invariant of 0.25 millimeters in the units I've used here. We said the number of spots the system could carry is the wavelength over two, divided into the Lagrange invariant. So wavelength over two would be 0.25 microns. This is 250 microns, so that's 1,000. Hey, this system is setup exactly to carry a thousand spots, which is convenient, because we have a thousand pixels. Let's see what that means in terms of it's setup to exactly carry a number of spots equal to the number of pixels. And a way to think about that is to think about what does the point spread function look like at the object plane here. That would be thinking about this in the Fourier domain. So I'm going to take a single five-micron pixel here, and I'm going to Fourier transform that little rectangular function. That would be a sinc function, a sine x over x, and the first null of that sinc would be for like 0.5 micron at a frequency of 200 inverse millimeters. So, this system if I radiate out with a little square pixels here. When I get to the aperture stop and notice this is that Fourier transform plane right behind the lens. I would see each of the spectra, the spacial frequency spectra of those pixels laid out in space. And the edge of the aperture stop would be right on the first null of that sine x over x function. And that's not a bad design principle because that's really what the information is. The extra bits of this Fourier transform carry the ship of the pixel, but really this blob in the middle between the first nulls, carries the information that there is a pixel there. So what this Fourier space is, or this phase space, is I plotted here at the plane of the object, where the light is in terms of position. There's no light, then there's a lot of light, then there's none. And this light is within plus or minus two and a half millimeters, the size of the field. I've imagined, just for clarity, I've turned one pixel right in the middle off. So I have pixels that are on, and then the white line represents one pixel that's off, and then the rest of the pixels are on. And that's just sort of a convenient little marker. And notice that, my marginal ray bounds the angular, or spacial frequency, extent of the object, but it's at the object plane, zero position. Yep, that's right there. While the chief ray bounds the positional extent of this bundle of information, but it's at zero angle. Yep, that's right there. So this phase space is a way of simultaneously looking at the spacial and angular content on my beam of light. And we see here in this nice telecentric case that we have this nice little box. The area of that box, I noticed that's a unitless quantity from here down to here turns out to be 2000. It turns out that the Fourier transform is symmetric for real objects. And so, the positive and negative side bands carry the same information. And so really, the information content of this system is the upper half, and that's 1,000, which is exactly the number of spots we just calculated. So this system is designed to carry in its phase space the field, an angular extend of the system, 1,000 spots. That's another way of looking at my Lagrange invariant. For now let's just advance through the system and see what happens. So, I've used the transfer equation to move all of these light, and to replot how it would look right before the lens. So first, let's do the Lagrange invariant. First of all, the angle of the chief ray, U bar here, is still zero, so this second term in my Lagrange invariant is still zero. The angle of the marginal ray and the height of the chief ray haven't changed, so the first term didn't change at all. So I still have the same h. So good, my invariant is indeed invariant. It turns out, what's happened to my phase space here, you can see the marginal ray is still at the same spatial frequency, that is, angle. That's what I see here, but it's moved over into a positive position. Yep, the chief ray hasn't done anything at all, stayed right where it was. So that's an indication of what happens in this phase space is everything just skews. That rectangle becomes a parallelogram. And it turns out, if you remember your basic geometry, the area of that parallelogram is the same as the area of the associated rectangle. The area didn't change. I still have the same information content in my phase space. All right, let's go through the lens. Now I've applied the refraction equation to both my rays and to all of the space up here, because every space here represents a ray. And I've just drawn two rays, the chief and the marginal. Okay, let's calculate my Lagrange invariant. That's a little harder now, a tiny bit harder. My marginal ray angle has become negative. There it is, minus 1/20th. But the height of my chief didn't change so that's still there at the edge of the field. Yep. The chief ray angle has become negative and it's parallel to the marginal ray, so it's also minus 1/20th. And the height of the marginal array I calculated. I put that in. And when I calculate that, look at that, Lagrange invariant is still the same. I'm still carrying the same number of spots. Over here in my phase space, I've just done another skewing operation it turns out. And when you skew parallelograms and rectangles, their area doesn't change. So once again, the area that I'm using in this phase space, set of angles and positions occupied by my rays are all quite different now. But if I sketch out the volume in phase space that they're occupying, it still the same. That's another way of thinking about, you can't squeeze the bundle of light. If I make the angles go up, the positions go down, this is a plot of that angle and position space. Let's stop at the aperture stop just to see what happens. Maybe it's an interesting space. Well, let's see. Now, because, by the definition of the chief ray, the chief ray height is zero. The first term in the Lagrange invariant expression goes to zero. But the second term shows up. So now, I'm going to use the angle of my chief ray. Still minus 1/20th as it was after the lens. But the height of my marginal ray there, five. So note what's happened now, still get the same Lagrange invariant, is the marginal ray and chief ray have switched their function. The chief ray now is bounding the angular extent of my bundle of rays, while the marginal ray is bounding the positional extent of my bundled rays. That's why you need two terms in the Lagrange invariant. They can swap back and forth, and in the object plane, and in this case the aperture plane, they have absolutely opposite character. Now, they've sort of switched what they do. At intermediate planes, it's mixed, but this term describes how that mixture never really changes and I still have the same Lagrange invariant, and the same number of spots. And we can kind of see that something magical has happened over here in the phase space, because now the chief ray is at a position of zero. Remember before here at the object, it had a position at the edge of the field and an angle of zero. It was bounding over here. And the marginal ray is now switched. It is now at, has a finite position. And so it's bounding the edge of the bundle of rays in position. So, again you can kind of see how these have switched back and forth, before they were lined up, up and down. Now they're lined up side to side, and once again that area is just completely skewed. Notice that if we just shove the detector here in position, what we'd see is the Fourier transform of these beams. If we slice across this and integrated up all the rays coming in a different angle, what we'd see is that sine x over x function. That's very cool, that tells us we could use a lens to take a Fourier transform of our pixels, and that's another concept for Fourier optics. And finally, let's go to the image plane. Notice that my little pixel that I turned off just for clarity here back at the center of the object. If I now put a camera here, I would see all the light from that pixel at the same position. Hey, I'm back in focus so all of my light from individual pixels is stacked up again, and it's only at individual positions out here in the image plane. Once again, the marginal ray height has gone to zero, so the second term in the Lagrange invariant has disappeared. That has to be the case, because that's the definition of the marginal ray. My field has doubled in height, this is a magnification minus two system, because now y bar is five, instead of 2.5. But of course, the angle of my marginal array, remember it was positive 1/10th, has now gone to minus 1/20th. So the angle has come down, the height has gone up, and I have the same Lagrange invariant. And once again, because when you screw things, the system doesn't change, and I get the same number of spots represented by the area as well. So, I hope this example has been useful to sort of understand this Lagrange invariant. And that its relationship to the number of spots, that in this nice, simple telecentric example, the marginal chief raise described here, angle and position, but here, the opposite character. But if you're careful about that, and understand the Lagrange invariant, the number of spots, the amount of information, the object, size, angle, product cannot be changed as you move through the system.