The first variational principle in physics was articulated by Euclid in his "Catoptrica". It says that, for the path of light reflecting from a mirror, the angle of incidence equals the angle of reflection. Hero of Alexandria later showed that this path gave the shortest length and the least time. Fermat refined and generalized this to "light travels between two given points along the path of shortest "time"" now known as the "principle of least time". For this, Fermat is recognized as a key figure in the historical development of the fundamental principle of least action in physics. The terms Fermat's principle and "Fermat functional" were named in recognition of this role.