Fermat's principle is of least time rather than of least distance. Would least distance apply for reflection? For refraction? Why are your answers different?