Gradient-index optics