Synthesis of minerals and rocks