The Geometry of Thermodynamic Potentials