Skip to main content
5 of 5
added 295 characters in body

Probably, there's no math. It's known as Lens flare. It happens when light reception takes place through lenses (both cameras and even your eyes) in the presence of a bright source which could be either inside or outside the frame. It is a condition that often occurs in photographs when light goes where it is not supposed to go. When light that is not contributing to the image at hand, enters the camera and hits the sensor or film, you get a flare in the photograph. These can wash out the color in the rest of the image, and show up as a polygonal object in the image. The number of rays and their direction depends on the angle of incidence. This link gives useful information regarding Lens flares.

Lens flares could be prevented using lens hoods or a lens having a good anti-reflective coating on it...