Tested tool guide
Tested browser tools
Checked August 16, 2026
What Optics Ray Tracer does, with a checked example
The Optics Ray Tracer draws how idealized light rays reflect from mirrors, refract at material boundaries, and pass through lenses or prisms. It also relates focal length, object distance, image distance, and magnification for thin-lens image formation. The diagram helps distinguish a real image, where outgoing rays converge, from a virtual image located by extending diverging rays backward. A common mistake is to treat every apparent ray intersection as a real image without checking whether the physical rays actually meet there.
Worked example
A concrete input and expected output from the current implementation.
Input
Converging lens: focal length = 10 cm; object distance = 30 cm; object height = 4 cm
->
Expected output
Image distance = 15 cm; magnification = -0.5; image height = -2 cm; real, inverted image at half the object's height.
The thin-lens equation gives 1/di = 1/10 - 1/30 = 1/15, so di is 15 cm. Magnification is -di/do = -15/30 = -0.5, making the 4 cm image height -2 cm; the negative sign indicates inversion.