different the Three types of rocks based on their formation​