How a butterfly takes flight