Materials Similar to Analogues in thermodynamics: the Partial Derivative Machine and Legendre transformations