Use this lens and ray optics simulator to see how convex and concave lenses form images. Change object distance, focal length, object height, and lens power to connect ray diagrams with cameras, glasses, and magnifying lenses.

How to use the lens and ray optics simulator

The tool shows the main rays used in school ray diagrams. Move one control at a time and watch how the image changes.

1

Choose the lens

Use a convex lens to focus rays or a concave lens to spread rays apart.

2

Move the object

Change object distance to see when the image becomes real, virtual, upright, or inverted.

3

Adjust focal length or power

Shorter focal length means stronger lens power, measured in diopters.

4

Read the results

Compare image distance, magnification, image height, and ray behavior.

What does the ray diagram show?

Blue and orange rays show the path light follows after passing through the lens. If the rays really meet, the image is real. If they only seem to come from a point when traced backward, the image is virtual.

Convex lens

A convex lens is thicker in the middle. It can bring parallel rays together at a focal point.

Concave lens

A concave lens is thinner in the middle. It spreads rays apart and usually makes a smaller upright virtual image.

Real image

A real image forms where rays actually meet. A camera sensor or screen can catch it.

Virtual image

A virtual image appears where rays seem to come from. Magnifying lenses use this idea.

Lens formulas used in the simulator

1/f = 1/do + 1/di m = -di/do P = 1/f in meters

The simulator uses positive focal length for convex lenses and negative focal length for concave lenses. Positive image distance means a real image on the far side of the lens. Negative image distance means a virtual image on the object side.

Ideas for practice

  • Choose the camera preset and notice why the image is real and inverted.
  • Choose the magnifier preset and move the object inside and outside the focal length.
  • Switch to a concave lens and observe why the image stays upright and virtual.
  • Increase lens power and watch the focal length become shorter.

Frequently asked questions

Why is the image sometimes upside down?

For a real image made by a convex lens, rays cross after passing through the lens. That crossing makes the image inverted.

Why does a magnifying lens make a virtual image?

When the object is inside the focal length, the rays do not meet on the far side. The eye traces them backward and sees a larger upright virtual image.

What is lens power?

Lens power measures how strongly a lens bends light. It is measured in diopters. A shorter focal length gives a larger power.

Leave a Comment