l.setCurve(d, 0); r.setCurve(d, 6);
if (left != null) left.setCurve(d, 0); if (right != null) right.setCurve(d, 6);
  public void subdivide(CubicCurve2D l, CubicCurve2D r)  {    if (l == null)      l = new CubicCurve2D.Double();    if (r == null)      r = new CubicCurve2D.Double();    // Use empty slots at end to share single array.    double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(),                                getCtrlX2(), getCtrlY2(), getX2(), getY2(),                                0, 0, 0, 0, 0, 0 };    subdivide(d, 0, d, 0, d, 6);    l.setCurve(d, 0);    r.setCurve(d, 6);  }