A class for conversion between zmatrices and cartesian coordinates