double D = x0;
    double curveArea()    {      double x0 = P1.getX();      double y0 = P1.getY();      double x1 = cp1.getX();      double y1 = cp1.getY();      double x2 = cp2.getX();      double y2 = cp2.getY();      double x3 = P2.getX();      double y3 = P2.getY();      double P = y3 - 3 * y2 + 3 * y1 - y0;      double Q = 3 * (y2 + y0 - 2 * y1);      double R = 3 * (y1 - y0);      double S = y0;      double A = x3 - 3 * x2 + 3 * x1 - x0;      double B = 3 * (x2 + x0 - 2 * x1);      double C = 3 * (x1 - x0);      double D = x0;      double area = (B * P - A * Q) / 5.0 + (C * P - A * R) / 2.0                    + (C * Q - B * R) / 3.0;      return (area);    }