How the ancient civilizations harnessed atmospheric energy