The connection between mathematics and art goes back thousands of years. Mathematics has been used in the design of Gothic cathedrals, Rose windows, oriental rugs, mosaics and tilings. Geometric forms were fundamental to the cubists and many abstract expressionists, and award-winning sculptors have used topology as the basis for their pieces.
But the final answer is worth the struggle. It reveals that the fastest path obeys a relationship known as Snell's law. What's spooky is that nature obeys it, too.
Snell's law describes how light rays bend when they pass from air into water, as they do when shining into a swimming pool....
The eerie point is that light behaves as if it were considering all possible paths and automatically taking the best one. Nature - cue the theme from "The Twilight Zone" - somehow knows calculus.