This article discusses how rocks are formed. There are also articles on physical rock formations, rock layerings (strata), and the formal naming of geologic formations. Terrestrial rocks are formed by three main mechanisms: Sedimentary rocks are formed through the gradual accumulation of sediments: for example, sand on a beach or mud on a river bed. As the sediments are buried they get compacted as more and more material is deposited on top. Eventually the sediments will become so dense that they would essentially form a rock. This process is known as lithification. Igneous rocks have crystallised from a melt or magma. The melt is made up of various components of pre-existing rocks which have been subjected to melting either at subduction zones or within the Earth's mantle. The melt is hot and so passes upward through cooler country rock. As it moves, it cools and various rock types will form through a process known as fractional crystallisation. Igneous rocks can be seen at mid-ocean ridges, areas of island arc volcanism or in intra-plate hotspots. Metamorphic rocks once existed as igneous or sedimentary rocks, but have been subjected to varying degrees of pressure and heat within the Earth's crust. The processes involved will change the composition and fabric of the rock and their original nature is often hard to distinguish. Metamorphic rocks are typically found in areas of mountain building. Rock can also form in the absence of a substantial pressure gradient as material that condensed from a protoplanetary disk, without ever undergoing any transformations in the interior of a large object such as a planet or moon. Astrophysicists classify this as a fourth type of rock: primitive rock. This type is common in asteroids and meteorites. Rock formation 19th-century efforts to synthesize rocks The synthetic investigation of rocks proceeds by experimental work that attempts to reproduce different rock types and to elucidate their origins and structures. In many cases no experiment is necessary. Every stage in the origin of clays, sands and gravels can be seen in process around us, but where these have been converted into coherent shales, sandstone and conglomerates, and still more where they have experienced some degree of metamorphism, there are many obscure points about their history upon which experiment may yet throw light. Attempts have been made to reproduce igneous rocks, by fusion of mixtures of crushed minerals or of chemicals in specially contrived furnaces.