🧠Cerebite

Convex and Concave Lens Lab

Move the candle and see how a lens bends light and where the image forms. Then fit glasses to nearsighted and farsighted eyes, and place lenses to guide light in a puzzle game.

Drag the candle (or use the slider) and watch three special rays find the image. Switch between a convex and a concave lens and change the focal length to see the image move, flip and change size.

Ray parallel to the axis Ray through the center Ray aimed at a focal point Traced back (virtual image)
Object distance a
Image distance b
Magnification
Image height (object 4 cm)

Why light bends: refraction

Light travels more slowly in glass than in air — about two-thirds as fast. When a beam meets a glass surface at an angle, the side that enters first slows down first, and the whole beam swings to a new direction. This bending at a boundary is called refraction, and the amount follows Snell's law: the more the speed changes and the steeper the angle, the more the light turns.

A lens is a piece of glass whose surfaces are curved, so the angle between the light and the surface changes from the center to the edge. Light passing near the edge meets a more tilted surface and bends more; light through the middle hardly bends at all. That smooth change is what lets a lens bring a whole bundle of rays together, or spread it apart, in a controlled way.

Convex lenses gather light

A convex lens is thicker in the middle than at the edges. Light arriving parallel to its axis is bent toward the axis and meets at one point behind the lens, the focal point F′. The distance from the lens to that point is the focal length f. A strongly curved lens bends light more and has a short focal length; a gently curved one has a long focal length. Because light can pass through either way, there is a matching focal point F on the front side at the same distance.

That is why a magnifying glass can set paper on fire: sunlight arrives almost perfectly parallel, and the lens squeezes all of it into a tiny spot at the focal point. Run the process backwards and you get a lighthouse or a flashlight — a bulb placed at the focal point sends its light out as a parallel beam that stays bright far away. Level 1 and level 3 of the puzzle are built on exactly these two facts.

Concave lenses spread light

A concave lens is thinner in the middle and thicker at the edges, so it bends light away from the axis. Parallel light leaves the lens spreading out, and if you trace those rays backwards they all seem to come from a single point in front of the lens. That point is the focal point of a concave lens, and because the light never actually passes through it, the focal length is written as a negative number.

Because a concave lens only ever spreads light, rays from an object never meet again after it. Whatever the distance, you see an upright, smaller virtual image — the wide, shrunken view through a door peephole. On its own it cannot project anything on a screen, but combined with a convex lens it is very useful: it corrects nearsighted eyes and forms the eyepiece of a Galilean telescope.

Drawing the image with three rays

Every point of an object sends light in all directions, but three rays are easy to predict and are enough to find where the image of the tip lands. The ray lab draws them in three colors. A ray parallel to the axis leaves through the far focal point (red). A ray through the center of the lens goes straight on (yellow). A ray heading for the near focal point leaves parallel to the axis (blue).

Where the three rays cross after the lens, a real image forms. When they spread apart instead, draw them backwards as dashed lines: the point where the dashed lines meet is a virtual image. For a concave lens the rules are mirrored — the parallel ray leaves as if it came from the near focal point, and the ray aimed at the far focal point leaves parallel — and the lab handles both cases.

The lens formula and magnification

The ray diagram can be turned into one short equation. With a the distance from the object to the lens, b the distance from the lens to the image and f the focal length, 1/f = 1/a + 1/b. For a convex lens with f = 10 cm and a candle 15 cm away, 1/b = 1/10 − 1/15 = 1/30, so the image is 30 cm behind the lens. The magnification is m = −b/a = −2: the image is twice as tall and the minus sign says it is upside down.

The signs carry the meaning. A positive b is a real image on the far side of the lens; a negative b is a virtual image on the object's side. A concave lens has a negative f, and the formula then always gives a negative b with 0 < m < 1. When a equals f, 1/b becomes zero and the image moves off to infinity — the light leaves parallel. Every number shown in the lab and asked in the hard quiz comes straight from these two formulas.

Real images and virtual images

A real image is a place where light from the object actually comes together again. Put a sheet of paper there and the picture appears on it, upside down — this is what happens on a camera sensor, on the screen in front of a projector and on the back of your eye. For a convex lens, the closer the object comes to the focal point, the farther away and larger the real image becomes.

A virtual image is only where light seems to come from. The rays leaving the lens are still spreading, and your brain, which assumes light travels in straight lines, traces them back to a point that no light ever reaches. You can see it by looking into the lens, but a screen placed there stays dark. Magnifying glasses, door peepholes and flat mirrors all show virtual images.

Eyes, glasses and diopters

The eye is a camera with a convex lens. The cornea and the lens inside the eye focus light onto the retina, about 2 cm behind them. In nearsightedness (myopia) the eye focuses too strongly, usually because the eyeball is a little too long, so light from far away comes together in front of the retina and distant things look blurry. In farsightedness (hyperopia) the focus falls behind the retina.

Glasses fix this by adding or removing focusing power in front of the eye. Their strength is given in diopters: power = 1 ÷ focal length in meters. A −2.00 D lens is a concave lens with a 50 cm focal length; a +2.00 D lens is a convex lens with the same focal length. In the eyes-and-glasses tab, the nearsighted eye needs about −5.25 D and the farsighted eye about +4.75 D, slightly different from the eye's 5 D error because the glasses sit 12 mm in front of the eye. Real eyes can also refocus on their own (accommodation), which the simulation leaves out.

Lenses in cameras, magnifiers and telescopes

Most optical instruments are one or two lenses placed at the right distances, and the puzzle levels follow the same designs. A camera puts the subject far beyond 2F so a small, sharp, upside-down image lands on the sensor. A projector does the reverse, with the slide just outside F. A magnifier keeps the object inside F. Telescopes use two lenses so that their focal points coincide and starlight comes out parallel again.

Frequently asked questions

Why does a convex lens make things look upside down?
When the object is beyond the focal point, light from its top crosses the axis on the way through the lens and lands below it, while light from the bottom lands above. The rays cross over, so the real image is upside down. Hold the object inside the focal length and the rays no longer cross; you see an upright, enlarged virtual image instead, which is how a magnifying glass is used.
Why can't a concave lens make a real image?
A real image needs light to come together after the lens, and a concave lens always spreads light out. Rays from a real object leave it diverging even more than before, so they never meet; they only appear to come from a point in front of the lens. That is why a single concave lens always gives an upright, smaller virtual image.
How can a magnifying glass burn paper?
Sunlight arrives almost parallel, so a convex lens brings it together at its focal point. All the light that hits the lens, a circle several centimeters across, is squeezed into a spot a few millimeters wide, so the energy per square millimeter goes up hundreds of times and the paper heats until it scorches. It only works with the paper at the focal length; closer or farther, the spot is larger and cooler. Never look at the Sun through a lens.
What does −3.00 on a glasses prescription mean?
It is the lens power in diopters, which is 1 divided by the focal length in meters. −3.00 D is a concave lens with a focal length of 1/3 m, about 33 cm, used for nearsightedness. A plus sign means a convex lens for farsightedness or reading. The bigger the number, the stronger the lens and the shorter its focal length.
How many lenses does a telescope need?
A simple refracting telescope needs two: an objective with a long focal length that gathers light, and an eyepiece with a short focal length. Spaced so their focal points meet, they send the light out parallel again and the magnification is the ratio of the focal lengths. Two convex lenses (Kepler) give an upside-down view; a convex objective with a concave eyepiece (Galileo) gives an upright one. Puzzle levels 9 and 10 let you build both.
How accurate is this simulation?
It uses the thin-lens model taught in school: each lens bends light at a single plane, and every number follows exactly from 1/f = 1/a + 1/b and m = −b/a. The rays are paraxial, meaning close to the axis. Real thick lenses also show aberrations — slightly different focal points for different colors and for rays near the edge — which are not modeled. The eye is simplified to one lens with the retina 20 mm behind it, without its own focusing.