All living organisms are a part of dynamic systems that continually exchange energy. These systems are regulated by both biotic and abiotic factors. Nutrients needed to sustain life in an ecosystem are cycled and reused, but the energy that flows through the ecosystem is lost as heat and must constantly be renewed. Green plants are the foundation of the energy flow in most ecosystems because they are capable of producing their own food by photosynthesis. Because energy is either used by consumers or depleted in a logical progression, it can be said to flow through a food web (also known as a food chain). A food web may be represented as an energy pyramid with green plants as a base, midlevel consumers in the middle, and a few top-level predators at the apex. Scavengers and decomposers are the final members of an energy pyramid as they clean up the environment and return matter (nutrients) to Earth. A food web can also show the various roles played by plants and animals as producers, consumers, and decomposers.