Photosynthesis converts light energy to chemical energy through a series of complex reactions. Chlorophyll and other pigments in chloroplasts absorb light which is used to split water and produce oxygen. This provides electrons and hydrogen used to reduce NADP and produce ATP through an electron transport chain. The Calvin cycle then uses ATP and NADPH to fix carbon dioxide and produce glucose or other carbohydrates as food for the plant. Environmental factors like light, temperature, and water availability can impact the rate of photosynthesis. Some plants have evolved C4 or CAM pathways to more efficiently fix carbon dioxide.