Eyes function like a camera.
Light reflected or scattered from objects is focused by a lens on to the retina. The pupil acts like a shutter and admits more or less light on the lens. Ciliary muscles control the size of the pupil. When the light is intense, the ciliray muscles contract and the pupil becomes small. When the source of light is dim, the ciliary muscles relax and the size of the pupil is expanded to admit more light in the eye.