code: public double curvePoint(XYZ vec, float t) {
          double tmp = 0;
          switch (vec) {
          case X:
              tmp = catmullRom(points[0], points[3], points[6], points[9], t);
              break;
          case Y:
              tmp = catmullRom(points[1], points[4], points[7], points[10], t);
              break;
          default:
              break;
          }
          return tmp;
      }
docs: Evaluates the curve at point t.
  
  @param vec The coordinate to get the location of a curve at t.
  @param t value between 0 and 1