A windmill is a machine that is powered by the energy of the wind. It is designed to convert the energy of the wind into more useful forms using rotating blades or sails. The term also refers to the structure it is commonly built on.
In much of Europe, windmills served originally to grind grain (hence the "mill" derivation), though later applications included pumping water and, more recently, generation of electricity. Recent electricity-generating versions are referred to as wind turbines. The first practical windmills were the vertical axle windmills invented in eastern Persia, as recorded by the Persian geographer Estakhri in the 9th century.
The authenticity of an earlier anecdote of a windmill involving the second caliph Umar (AD 634–644) is questioned on the grounds of being a 10th-century amendment. Made of six to twelve sails covered in reed matting or cloth material, these windmills were used to grind corn or draw up water, and quite different from the later European versions. They were widely used throughout the Caliphate by the 9th century and spread to Europe through Islamic Spain.
A similar type of vertical shaft windmill with rectangle blades, used for irrigation, can also be found in 13th-century China (during the Jurchen Jin Dynasty in the north), introduced by the travels of Yelü Chucai to Turkestan in 1219. Fixed windmills, oriented to the prevailing wind were, for example, extensively used in the Cyclades islands of Greece. The economies of power and transport allowed the use of these 'offshore' mills for grinding grain transported from the mainland and flour returned.
A 1/10th share of the flour was paid to the miller in return for his service. This type would mount triangular sails when in operation.