Temperature changes can also contribute to mechanical weathering in a process called thermal stress. Changes in temperature cause rock to expand (with heat) and contract. As this happens over and over again, the structure of the rock weakens. Over time, it crumbles. The heat generated by the magma chamber has changed these sedimentary rocks into the metamorphic rocks marble, quartzite, and hornets.