Light, traced through the glass.
Lenses, prisms, mirrors and scattering media in a world file. Sweep a setting, and every trial is a run on the record.
Case study 1 · a ball lens
The sharpest spot is not at the focus.
A parallel beam, 12 mm wide, meets a 20 mm ball of N-BK7 glass. The paraxial formula puts the focus 4.67 mm behind the ball. The trials move the screen in 26 steps and measure the spot each time. The outer rays bend more, so they cross first, and the smallest spot is nearer the ball.
- rms spot at its smallest, 3.7 mm behind the ball
- 116 µm
- nearer the ball than the paraxial focus
- 0.97 mm
- wider spot at the paraxial focus (302 µm)
- 2.6×
- trials, one simulated run each
- 26
Simulated

cloud://home/user-commandagi/case-studies/optics/ball-lens/focus.trials.jsonEjecución runs/20261104t161917z-iodeHerramienta sim-optics.js, the trial runnerSe ejecutó en This computer (dell-gb10-1)Cuándo The sweep
Each trial is one point of the curve.
The sweep run's outcomes stream holds one record per trial: the screen's place, the rms width and the trial's own run. The curve is those records.
The spot narrows from 619 µm at 1.5 mm behind the ball to 116 µm at 3.7 mm, then widens again to 787 µm at 6.5 mm.
Los números
| Screen behind the ball (mm) | rms spot width |
|---|---|
| 1.5 | 619 µm |
| 1.7 | 564 µm |
| 1.9 | 510 µm |
| 2.1 | 456 µm |
| 2.3 | 403 µm |
| 2.5 | 350 µm |
| 2.7 | 299 µm |
| 2.9 | 248 µm |
| 3.1 | 201 µm |
| 3.3 | 159 µm |
| 3.5 | 128 µm |
| 3.7 | 116 µm |
| 3.9 | 129 µm |
| 4.1 | 162 µm |
| 4.3 | 204 µm |
| 4.5 | 252 µm |
| 4.7 | 302 µm |
| 4.9 | 354 µm |
| 5.1 | 407 µm |
| 5.3 | 460 µm |
| 5.5 | 514 µm |
| 5.7 | 568 µm |
| 5.9 | 623 µm |
| 6.1 | 677 µm |
| 6.3 | 732 µm |
| 6.5 | 787 µm |
cloud://home/user-commandagi/case-studies/optics/ball-lens/focus.trials.jsonEjecución runs/20261104t161917z-iodeCuándo Case study 2 · a prism
The trace agrees with the closed form to 0.0001°.
A 30 mm equilateral prism of N-BK7 splits blue, green and red light. The trials turn the beam in 29 steps. At the smallest deviation the ray inside runs parallel to the base, and the textbook gives δ = 2 asin(n sin 30°) − 60° exactly. The trace finds the same angle.
- smallest deviation of green (530 nm), traced
- 38.8888°
- the same angle in closed form
- 38.8889°
- between blue (450 nm) and red (650 nm) at that angle
- 0.95°
- trials in two sweeps
- 58
Simulated

cloud://home/user-commandagi/case-studies/optics/prism/deviation.trials.jsonEjecución runs/20261104t161918z-1y5nHerramienta sim-optics.js, the trial runnerSe ejecutó en This computer (dell-gb10-1)Cuándo The sweep
Steeper light, a wider fan.
The second sweep scores the angle between blue and red. The fan is widest when the beam meets the face at a steep angle, and it narrows as the beam turns past the angle of smallest deviation.
- The kernel is sequential and analytic: Snell's law, Cauchy dispersion, Fresnel splitting, Beer–Lambert absorption and Henyey–Greenstein scattering. It has no diffraction, thin films or polarization.
- A simulated trial is evidence about the model, never about a real lens.
Green's deviation falls from 40.9° to its smallest, 38.9°, at a beam angle of 19.5°, then rises to 45.0° at 41.3°; the blue–red fan narrows from 1.25° to 0.82° over the same angles.
Los números
| Beam angle (°) | Green's deviation − 38° | Blue–red fan |
|---|---|---|
| 9.2 | 2.94° | 1.25° |
| 10.3 | 2.45° | 1.19° |
| 11.5 | 2.05° | 1.14° |
| 12.6 | 1.71° | 1.1° |
| 13.8 | 1.45° | 1.07° |
| 14.9 | 1.24° | 1.04° |
| 16 | 1.08° | 1.01° |
| 17.2 | 0.97° | 0.99° |
| 18.3 | 0.908° | 0.97° |
| 19.5 | 0.889° | 0.952° |
| 20.6 | 0.91° | 0.936° |
| 21.8 | 0.97° | 0.922° |
| 22.9 | 1.07° | 0.909° |
| 24.1 | 1.2° | 0.898° |
| 25.2 | 1.36° | 0.888° |
| 26.4 | 1.56° | 0.879° |
| 27.5 | 1.8° | 0.871° |
| 28.6 | 2.06° | 0.864° |
| 29.8 | 2.36° | 0.858° |
| 30.9 | 2.69° | 0.852° |
| 32.1 | 3.04° | 0.847° |
| 33.2 | 3.43° | 0.843° |
| 34.4 | 3.85° | 0.839° |
| 35.5 | 4.3° | 0.836° |
| 36.7 | 4.79° | 0.833° |
| 37.8 | 5.3° | 0.83° |
| 39 | 5.84° | 0.828° |
| 40.1 | 6.41° | 0.826° |
| 41.3 | 7.01° | 0.824° |
cloud://home/user-commandagi/case-studies/optics/prism/spread.trials.jsonEjecución runs/20261104t161918z-f943Cuándo Trace your own glass.
A bench is a few lines of a world file. Describe it, or write it, and sweep any number in it.