Elements
Add a lens, a mirror or a screen.
Object
Rays
View
Ray diagrams for lenses and mirrors
A magnifying glass, a camera, the mirror on a car and your own eye all make images by bending or bouncing rays of light. Put lenses, mirrors and screens on the optical bench, drag the object and watch the rays find its image: real or virtual, upright or inverted, larger or smaller. The thin lens and mirror equations work out every number, and the principal rays show you why, like a textbook ray diagram that moves. Pick an example, then drag the object (the orange arrow) along the axis, or its tip up and down, and watch the image move, grow, shrink and flip. Drag a lens, a mirror or a screen to move it, or off the picture to remove it, and drag a focal point F to change the focal length. Tap an element to select it and set its kind, focal length and height under Elements; add lenses, mirrors and screens there too. The tiles give the image distance, the magnification and the lens or mirror equation with the numbers filled in. Press Play to send the object slowly towards the first lens or mirror and back: the image runs off to infinity as the object passes the focal point and comes back on the other side, virtual. Back and Step move by half a second. Turn on Real surfaces under Rays to trace the rays through real spherical glass and mirrors and see spherical aberration.
How it works
- Pick an example, such as a convex lens, a concave mirror, a camera or a telescope. Drag the orange object along the axis, or drag its tip to make it taller, and the rays and the image follow.
- Drag a lens or a mirror to move it, or drag a focal point F to change its focal length. Tap an element to choose its kind, focal length and height, and add lenses, mirrors and screens under Elements.
- Read the image distance, the magnification and the lens or mirror equation with the numbers filled in. A dashed arrow and dashed rays mark a virtual image, which the rays only seem to come from.
- Press Play to send the object towards the lens and back, and watch the image run off to infinity and come back virtual. Turn on Real surfaces under Rays to see spherical aberration.
The thin lens equation
A thin lens of focal length f makes an image of an object at a distance dₒ at a distance dᵢ given by 1/f = 1/dₒ + 1/dᵢ, and the image is m = −dᵢ/dₒ times as tall as the object. The app uses the real-is-positive convention: distances are measured from the lens, dᵢ is positive for a real image on the far side and negative for a virtual image on the object's side, and f is positive for a converging lens. The first example's lens, with f = 10 cm and the object 30 cm away, makes a real, inverted image 15 cm behind it, half as tall: 1/30 + 1/15 = 1/10.
Principal rays
Three rays from the tip of the object are easy to follow. A ray parallel to the axis leaves a converging lens through the focal point F′ behind it; a ray through the centre of the lens goes straight on; and a ray through the focal point F in front leaves parallel to the axis. Where they cross is the tip of the image. A diverging lens spreads the rays out, and traced backwards they meet in front of the lens: a virtual image, upright and smaller. Every other ray from the tip passes through the same image point, as the fan of rays shows.
Curved mirrors
A concave mirror focuses light like a converging lens. Its focal length is half its radius of curvature, f = R/2, and the same equation 1/f = 1/dₒ + 1/dᵢ holds, except that a real image forms in front of the mirror. An object 45 cm from the example's mirror (f = 15 cm) has a real, inverted image 22.5 cm in front of it, half as tall. Bring the object inside the focal point and the image becomes virtual, upright and magnified, behind the mirror: a make-up mirror. A convex mirror always gives a smaller, upright, virtual image and a wide view, which is why it is used on cars and at blind corners.
Telescopes, microscopes and cameras
Two lenses make an instrument: the first forms an image, and the second takes it as its object. In a Keplerian telescope the objective (f = 40 cm) and the eyepiece (f = 8 cm) stand about f₁ + f₂ apart, and a distant tree looks about f₁/f₂ = 5 times larger, upside down; the Galilean telescope's diverging eyepiece keeps the view upright. A microscope's short objective makes a large real image that the eyepiece magnifies again: the example's 3 cm objective and 5 cm eyepiece magnify about 32 times. A camera's lens throws a small inverted image onto the sensor, sharp only when the image distance matches the distance to the sensor.
Frequently asked questions
What is the difference between a real and a virtual image?
A real image is where the light really meets after a lens or a mirror: put a screen there and the picture appears on it, as in a camera or a projector. A virtual image is where the light only seems to come from: the rays leaving the lens spread out, and your eye traces them back to a point they never pass through, like your reflection behind a plane mirror or the enlarged print seen through a magnifying glass. In the app real images are solid arrows and virtual images dashed ones, with the rays traced back dashed too.
What sign convention does the app use?
Real is positive. Distances are measured from the lens or mirror. The object distance dₒ is positive for an ordinary object on the side the light comes from. The image distance dᵢ is positive for a real image (behind a lens, in front of a mirror) and negative for a virtual one. The focal length is positive for a converging lens and a concave mirror and negative for a diverging lens and a convex mirror. With these signs 1/f = 1/dₒ + 1/dᵢ and m = −dᵢ/dₒ hold in every case, and a negative magnification means the image is upside down. Some books use the Cartesian convention, with distances to the left negative: the formulas then look different but describe the same images.
Why does the image vanish when the object is at the focal point?
Rays from a point in the focal plane leave the lens parallel to each other, so they never meet: the image is at infinity. Move the object a little farther away and a very large real image forms far behind the lens; move it a little closer and the rays spread out, giving a large virtual image in front. Press Play and watch the image run off to one side and come back from the other as the object crosses F. A projector works just outside the focal point and a magnifying glass just inside it.
What is magnification, and what is angular magnification?
The magnification m = hᵢ/hₒ = −dᵢ/dₒ compares the image's height with the object's: m = −0.5 is an inverted image half as tall. With a magnifying glass, a telescope or a microscope you look at a virtual image, and what matters is how much bigger it looks: the angular magnification, the angle the image fills seen through the instrument over the angle the object fills to the naked eye, held 25 cm away or, for a telescope, where it is. The app shows the angular magnification for these instruments.
What is spherical aberration?
Lenses and mirrors with spherical surfaces bring the rays near the axis to the focal point, but rays through the edge are bent a little too much and cross sooner, so the image of a point is a small blur. Turn on Real surfaces: each lens becomes glass with n = 1.5 and spherical faces that give it the same focal length near the axis, each curved mirror a sphere of radius 2f, and the rays are traced with Snell's law and the law of reflection. A concave mirror then shows a bright curved caustic. Telescope makers avoid it with parabolic mirrors, and camera makers with lenses of several elements or aspheric surfaces.
Can I use the picture?
Yes. Save gives a PNG at the size you choose, and the pencil opens the picture in the PictorX photo editor with the axis, each lens, mirror and screen, the ray fan, the virtual rays, the principal rays, the object, the images and the labels on layers of their own, and the example's name as editable text. In the editor itself it is under Apps ▸ Science ▸ Physics ▸ Ray Optics, where you pick the example or type the elements and the object. Everything runs in your browser.
Ray Optics: how do I record a video?
Press the red Record button in the playback bar: it films what the stage shows. Press it again to stop, and the video is saved to your device. Recording is free; you only need to sign in. Without a subscription the video carries a small PictorX logo in a corner. The button beside Record opens the video options: the shape (as shown, square, story 9:16 or wide 16:9), the length (until you stop, or 5, 10, 15 or 30 seconds for social media) and the file: MP4, WebM or an animated GIF. For the sound, choose the app's own sounds or one of three music tracks: calm, bright or beat.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Go to Editor