Both a solar cooker and a greenhouse trap heat using a similar mechanism. Short-wavelength solar radiation (visible light) passes through a transparent cover (glass or plastic) and is absorbed by dark surfaces inside. These surfaces then re-emit energy as longer-wavelength infrared radiation. The transparent cover is largely opaque to this infrared radiation, trapping the heat inside. This is known as the greenhouse effect.