top of page

ray optics diagram creator

Welcome to the Ray Optics Diagram Creator, a specialized tool designed for physics educators. Create, manipulate, and export diagrams for basic geometric optics you can use for assessments or classwork.

Note: This is a continual work in progress.  What you see below is not the final product, I will continue to add additional functionality as time goes on.  

Interactive Graph Tool Placeholder

How to Use The Ray Optics Diagram Generator
 

Element Type

At the top of the left panel, choose one of four optical elements:

  • Convex Lens

  • Concave Lens

  • Convex Mirror

  • Concave Mirror

For mirrors, a note reminds you: concave = converging (f > 0), convex = diverging (f < 0).
 

Parameters

  • Focal Length (f): in cm

  • Object Distance (s_o): in cm

  • Object Height (h_o): in cm

You can also drag the object arrow directly on the canvas to change its position and height. Scroll on the canvas to zoom, and drag the background to pan.
 

Computed Image

Below the parameters, the tool automatically shows:

  • s_i: image distance, labeled real or virtual

  • h_i: image height, labeled upright or inverted

  • m: magnification


Rays

Three ray types are drawn by default, each with separate checkboxes for its incident and refracted/reflected segments:

  • Parallel Ray

  • Central Ray

  • Focal Ray

Use "Show all" or "Hide all" to toggle every ray at once.

Teacher Tip: use this to scaffold your ray diagrams when you're first teaching your students.  You can show them fully diagramed examples, examples with partial rays for them to fill in the rest, or completely blank diagrams for them to do all on their own!


Display

  • Show object

  • Show image

  • Show distances (s_o/ s_i): adds distance labels and lines to the diagram


Grid

  • Show grid

  • Choose grid spacing: 0.5 cm, 1 cm, 2 cm, or 5 cm


Canvas

  • Zoom in / zoom out buttons

  • Reset button returns the canvas to its default view


Print Note

SVG export uses physical cm units. Print at 100% scale so that, for example, a 3 cm focal length measures 3 cm on paper.


Exporting

At the top of the left panel:

  • Copy: copies the diagram to your clipboard

  • SVG: exports as a vector graphic

  • PDF: exports as a printable PDF

bottom of page