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.
Sign convention: converging elements use positive focal length; diverging elements use negative focal length. Positive image distance is real, negative is virtual.
- Parallel ray
- Central / C ray
- Focal ray
Image distance v
15
Magnification m
-0.5
Image type
real
Orientation and size
inverted, reduced
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.
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.
More tools

Circuit Diagram Maker
Generate accurate circuit diagrams with labeled schematic symbols for research papers, lab reports, and technical publications.

Free Body Diagram Generator
Create accurate, publication-ready free body diagrams with labeled force vectors for weight, normal force, friction, and tension in seconds.

Graphical Abstract Maker
Generate a publication-ready graphical abstract — a single-panel visual summary that captures your study's methods, key finding, and result with clear icons and flow arrows.
Home
Free AI Scientific Figure Generator and Figure Maker — Create Research Figures, Images, Illustrations and Diagrams
Text-to-Figure
Generate a figure from a plain-language description
Models
Default to GPT Image 2 for journal papers; switch to Nano Banana Pro for slides and posters; pick Nano Banana 2 for routine figure work
Tutorials
Seven short walkthroughs of the AI scientific figure generator
Blog
Tutorials, tool comparisons, and publication tips for researchers.
Inspiration
Explore publication-ready scientific figure examples, copy the prompts, and use them as starting points for your own work.

Ready to publish?
Make your own ray diagram in minutes.
Start for freeFree to start · No credit card required · Built for researchers