How is temperature related to mineral formation?