Rocks found on Earth are generally classified as sedimentary, igneous, and metamorphic. On which basis are these classifications made?