Equations for triangle properties