According to Fermat’s principle, the actual path between two points taken by a beam of light is one that takes the least time. In 1697 Johann Bernoulli used this principle to derive the brachistochrone curve by considering the trajectory of a beam of light in a medium where the speed of light increases following a constant vertical acceleration (that of gravity g).