How solar and wind power are generated