PPolySim OS

Ray Optics / Lenses

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

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.

▶ Run in Python

Data Inspector

Lensconverging
Focal length120px
Magnification-1.00×
Equation1/v − 1/u = 1/f

Governing equation

Reading this result: The object sits near 2f, so the image is real, inverted and roughly the same size (1:1).

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →
★ Sign in to save this setup
Save 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.

More Physics simulations

Frequently asked questions

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.