Eye Vision: Focusing & Accommodation (2D)

This 2D cross-section reimplements the eye's optics as a real thin-lens model: three light rays leave the tip of an object, refract at the cornea/lens plane, and converge on (or miss) the retina at the back of a schematic eyeball. Move the object closer or farther, shrink or widen the pupil, switch between a normal eye, myopia (elongated eyeball) and hyperopia (shortened eyeball), and compare automatic accommodation — the lens visibly thickening as the ciliary muscle works — against manual control, or add corrective glasses and watch the diverging or converging correction lens pull the focus point back onto the retina. Live readouts report the focus distance, the eye's total optical power in diopters, and an image-sharpness bar derived from the blur-circle radius at the retina.