the mineral composition of rock depends on how it is formed. name the three distinct rock types, explain how each rock type is formed, and give one specific example of a rock of each type.