An algorithm for the calculation of the light distribution in photovoltaic greenhouses