Anyone who travels much by air knows that pilots try to ride the wind. Flights may even deviate substantially from the shortest-distance route if the wind is strong enough elsewhere. But of course the wind is not likely moving exactly toward your destination. Add to this the fact that the wind also varies with altitude, and the problem of designing the optimal route of flight becomes highly complex. It is a problem in the calculus of variations (optimizing functionals rather than mere functions) and is analogous to the optics problem of predicting the path of light through a medium with variant refractive index. But this approach requires analytical wind fields, described with functions, rather than numerically derived winds described, for instance, on a grid. In practice the optimal routing problem is solved using various iterative methods. Amazingly, migratory insects also solve this type of problem. Read more