A principle of images for absorbing boundary conditions