Controlling the intensity of light