code: private Coordinate p( int i, double t ) {
          double px = 0;
          double py = 0;
          for( int j = -2; j <= 1; j++ ) {
              Coordinate coordinate = pts.get(i + j);
              px += b(j, t) * coordinate.x;
              py += b(j, t) * coordinate.y;
          }
          return new Coordinate(px, py);
      }
docs: evaluate a point on the B spline