Ray optics
Light travels in straight lines until it meets something interesting. A lens bends it by Snell’s law, a mirror bounces it at equal angles, and a prism splits white into the spectrum Newton first unfolded in 1666. Place optical elements on the canvas, watch rays trace through them in real time, and see the geometry that makes telescopes, fiber optics, and rainbows possible.
Geometric optics vs. wave optics
Ray optics — also called geometric optics — treats light as a collection of straight lines (rays) that bend at surfaces according to simple rules. This approximation works beautifully whenever the objects light interacts with are much larger than its wavelength (about 400–700 nanometers for visible light). Lenses, mirrors, prisms, and camera systems are all designed using ray optics.
Wave optics (physical optics) becomes necessary when light encounters structures comparable to its wavelength: thin films produce iridescent colors, small apertures produce diffraction patterns, and two slits produce interference fringes. But for the macroscopic world of telescopes, eyeglasses, and fiber optics, rays are enough. Every optical instrument ever built was first designed on paper with ray diagrams.
The law of refraction
When light passes from one medium to another — air to glass, water to air — it changes speed. The ratio of speeds is the index of refraction: n = c/v, where c is the speed of light in vacuum and v is the speed in the medium. Air has n ≈ 1.00, water n ≈ 1.33, glass n ≈ 1.52, and diamond n ≈ 2.42.
Snell’s law relates the angles: n₁ sin θ₁ = n₂ sin θ₂. When light enters a denser medium (higher n), it bends toward the surface normal; when it exits into a less dense medium, it bends away. This is why a pencil looks bent in water, why pools appear shallower than they are, and why lenses can focus light.
Historical discovery
The law was known to Ibn Sahl in Baghdad in 984 CE, rediscovered by Willebrord Snellius in 1621, and published by René Descartes in 1637. Snellius never published his result; Descartes may or may not have known of it. The law can be derived from Fermat’s principle of least time: light takes the path between two points that minimizes travel time, which forces it to bend at the boundary between media of different speeds.
Converging and diverging lenses
A convex (converging) lens is thicker at the center than at the edges. Parallel rays passing through it converge to a single point: the focal point. The distance from the lens center to the focal point is the focal length f, and it depends on the curvature of the lens surfaces and the index of refraction of the glass.
A concave (diverging) lens is thinner at the center. Parallel rays passing through it spread apart as if they originated from a virtual focal point on the same side as the incoming light. The focal length of a diverging lens is negative by convention.
The lensmaker’s equation
The focal length of a thin lens is given by 1/f = (n − 1)(1/R₁ − 1/R₂), where n is the index of refraction and R₁ and R₂ are the radii of curvature of the two surfaces. For a symmetric biconvex lens with both radii equal to R: 1/f = 2(n − 1)/R. Higher index means shorter focal length; more curved surfaces mean shorter focal length. This is why diamond lenses (if they existed) would be extremely powerful, and why thick spectacle lenses indicate strong correction.
The thin lens equation
For a thin lens, the object distance dₓ, image distance dᵢ, and focal length f are related by 1/f = 1/dₓ + 1/dᵢ. Objects beyond 2f produce real, inverted, reduced images. Objects between f and 2f produce real, inverted, magnified images. Objects inside f produce virtual, upright, magnified images — this is how a magnifying glass works.
The law of reflection
Reflection is the simplest optical law: the angle of incidence equals the angle of reflection, measured from the surface normal. Unlike refraction, reflection involves no change of medium and no wavelength dependence — all colors reflect the same way. This is why mirrors produce faithful color images while prisms split white light.
Curved mirrors
A concave (converging) mirror focuses parallel rays to a focal point at half the radius of curvature: f = R/2. This is the principle behind reflecting telescopes, satellite dishes, and solar concentrators. Newton invented the reflecting telescope in 1668 specifically to avoid the chromatic aberration that plagued refracting telescopes — mirrors focus all wavelengths to the same point.
A convex (diverging) mirror spreads parallel rays as if they came from a virtual focal point behind the mirror. These are the mirrors used in car side mirrors and security cameras — they provide a wider field of view at the cost of image size.
Why prisms make rainbows
The index of refraction is not a single number — it depends on wavelength. For most transparent materials, shorter wavelengths (blue/violet) have a higher index than longer wavelengths (red). This is called chromatic dispersion. When white light enters a prism, each wavelength refracts by a slightly different angle, and the colors fan out into the visible spectrum.
Newton’s crucial experiment
In 1666, Isaac Newton darkened his room at Trinity College, Cambridge, and let a thin beam of sunlight through a hole in the window shutter onto a glass prism. The spectrum it produced on the opposite wall was not new — people had seen prismatic colors before. What Newton did was pass a single color from the first prism through a second prism and show that it did not split further. This proved that the colors were in the white light all along, not created by the glass. He called it the experimentum crucis — the crucial experiment.
Rainbows in nature
Natural rainbows are prism effects writ large. Each raindrop acts as a tiny sphere: sunlight enters, refracts at the front surface, reflects off the back, and refracts again on exit. The different wavelengths exit at slightly different angles (about 40° for violet to 42° for red), and since there are billions of drops at all heights, you see a continuous arc of color. The secondary rainbow, sometimes visible above the primary, involves two internal reflections and has its colors reversed.
When light cannot escape
When light travels from a denser medium to a less dense one (glass to air), it bends away from the normal. As the angle of incidence increases, the refracted ray bends further and further until it runs along the surface — at the critical angle θc = arcsin(n₂/n₁). Beyond this angle, no refracted ray exists: all the light reflects back into the dense medium. This is total internal reflection.
Fiber optics
Total internal reflection is the principle behind fiber optic cables. A thin glass fiber (core) is surrounded by a slightly less dense glass (cladding). Light entering the fiber at a shallow angle hits the core-cladding boundary beyond the critical angle and bounces along the fiber indefinitely, carrying data at the speed of light. A single fiber can carry terabits per second over hundreds of kilometers. The entire internet backbone runs on total internal reflection.
Diamonds
Diamond has an unusually high index of refraction (n = 2.42), which gives it a very small critical angle of just 24.4°. Most light that enters a well-cut diamond undergoes multiple total internal reflections before exiting, and the high dispersion separates the colors dramatically. This is why diamonds sparkle with spectral fire — the combination of high refractive index, high dispersion, and precise cutting geometry.
The ancient world
Euclid wrote the Optica around 300 BCE, establishing that light travels in straight lines and that the angle of incidence equals the angle of reflection. Hero of Alexandria later proved that reflection follows the shortest-path principle. But the ancients believed vision worked by rays emanating from the eye, not to it — an error that persisted for a millennium.
The Islamic Golden Age
Ibn al-Haytham (Alhazen), working in Cairo around 1020 CE, wrote the Kitab al-Manazir (Book of Optics), which correctly argued that light enters the eye from external objects. He studied refraction, lenses, and the camera obscura, and his experimental method — testing hypotheses against observation — influenced Roger Bacon, Kepler, and the entire European scientific tradition. Some historians consider him the first true scientist.
Snellius and Descartes
Willebrord Snellius discovered the law of refraction experimentally around 1621 but never published it. René Descartes published the law in 1637 in his Dioptrique, possibly independently, possibly not. The French call it Descartes’ law; everyone else calls it Snell’s law. Ibn Sahl had it six centuries earlier but was lost to the Latin tradition until rediscovered in 1990.
Newton and the spectrum
Newton’s prism experiments of 1666 established that white light is a mixture of colors, and his reflecting telescope of 1668 solved the chromatic aberration problem that plagued refracting telescopes. His Opticks (1704) dominated optics for a century, though his corpuscular theory of light was eventually superseded by the wave theory of Young and Fresnel in the early 1800s — only for the corpuscle to return, transformed, as Einstein’s photon in 1905.