Optical properties of a sphere in the vicinity of a plane surface