See how a lens forms an image. Trace the principal rays through a converging or diverging lens and watch the image flip from real to virtual as you move the object.
Ray Optics / Lens StudioLive
thin-lens equation · ray tracing
Controls
Presets
Trace principal rays through a thin lens to locate the image. Move the object inside the focal point to flip from a real to a virtual image.
★ Sign in to save this setupSave your tuned setup, or drop this simulation into your own site, docs, or course page.
How it works
Using the thin-lens equation, 1/v − 1/u = 1/f, this tool traces the principal rays — parallel-then-through-focus and straight-through-center — to locate the image. Move the object inside the focal length to see a magnified, upright virtual image, or beyond it for a real, inverted one, exactly as in a physics lab.
✦
Ask the AI about this model
The math, the assumptions, real-world uses, or a code translation — explained for this exact simulation.
Is this ray optics lens simulation tool really free?▾
Yes. Ray Optics / Lenses runs entirely in your browser using your device's own compute, so local use is free forever. You only pay Compute Tokens if you scale a job to the cloud.
Do I need to install anything?▾
No. Everything runs client-side in a modern browser — no downloads, no license, no account required to start.
Can I save or share my simulation?▾
Create a free account to save projects, and use a shareable embed or minted DOI to publish a live, interactive version anywhere.
How accurate are the results?▾
The solver uses established numerical methods, but results are for research and educational purposes and should be validated against experiment or professional review before you rely on them.