The Mathematics of Geometrical and Physical Optics: The K-Function and Its Ramifications