Theory for modeling the optical properties of surfaces