The Formation of Mineral Deposits