SciFig
Publication-ready scientific figures

Ray Diagram Maker

Calculate image distance and magnification, then draw three principal rays for converging or diverging lenses and concave or convex mirrors.

Free in-browser optics tool

Build a lens or mirror ray diagram

Choose one optical element, enter exact values, and verify the image with the Gaussian equation and three principal rays. No account or credits required.

Typical image cases

Sign convention: converging elements use positive focal length; diverging elements use negative focal length. Positive image distance is real, negative is virtual.

Converging lens ray diagramThree principal rays show the calculated image location and orientation.Principal axisFF'ObjectImageConverging lens
  • Parallel ray
  • Central / C ray
  • Focal ray

Image distance v

15

Magnification m

-0.5

Image type

real

Orientation and size

inverted, reduced

The reduced, inverted, real image has magnification -0.5 and signed image distance 15.

Model: 1/f = 1/u + 1/v and m = -v/u under the paraxial thin-lens or spherical-mirror approximation. Dashed lines are backward extensions for virtual images. Display scale is clipped near the focal singularity; the numeric result remains exact.

3 principal rays · local calculation · no upload

Reviewed by SciFig TeamUpdated

What is a ray diagram?

A ray diagram maker calculates where an optical image forms and traces the principal rays that explain the result. This ray diagram generator supports a single converging lens, diverging lens, concave mirror, or convex mirror at a time. Enter focal length, object distance, and object height to solve the Gaussian equation locally, classify the image, and export an editable SVG or PNG without uploading data.

Ray Diagram Generator for Lenses and Mirrors

  • Four optical elements — switch between converging and diverging lenses or concave and convex mirrors without changing tools.
  • Exact numeric controls — combine sliders with precise focal length, object distance, and object height inputs.
  • Typical presets — compare objects beyond 2F, at 2F, inside F, and in front of diverging elements.
  • Immediate classification — the ray diagram generator reports real or virtual, upright or inverted, and magnified, equal, or reduced images.
  • Local calculation — the ray diagram maker online performs every equation in the browser with no upload or account.
  • Deterministic geometry — identical inputs always produce identical ray paths and image measurements.

Three Principal Rays for Every Optical Element

  • Parallel ray — enters parallel to the principal axis and refracts through, or appears to diverge from, a focal point.
  • Central ray — crosses a thin lens optical center without deviation; for mirrors, a ray along the center-of-curvature line reflects back along the same path.
  • Focal ray — passes through or aims toward a focal point and leaves parallel to the principal axis.
  • Principal axis — provides the signed reference line for object, element, focal points, and image.
  • Object and image arrows — show orientation and relative height directly from the calculated magnification.
  • Dashed extensions — distinguish a virtual image from solid rays that physically carry light.

Thin Lens and Mirror Equation, Signs, and Image Classification

  • Gaussian equation — 1/f = 1/u + 1/v determines signed image distance for the thin-element model.
  • Focal-length sign — converging lenses and concave mirrors are positive; diverging lenses and convex mirrors are negative.
  • Image-distance sign — positive v is real and negative v is virtual under the displayed convention.
  • Magnification — m = -v/u sets image height and indicates upright or inverted orientation.
  • Focal singularity — u = f sends the image to infinity, so the ray diagram software draws finite parallel rays and no image arrow.
  • Export — download the exact diagram as SVG for editing or PNG for worksheets, slides, and reports.

Ray Diagram Maker — Frequently Asked Questions

Common questions about Ray Diagram Maker.

1.

2.

3.

4.

5.

6.

Call to action background

Ready to publish?

Make your own ray diagram in minutes.

Start for free

Free to start · No credit card required · Built for researchers