private static void addCurve(Path2D line,Point2D p0,Point2D p1,Point2D p2,Point2D p3,Point2D ctrl1,Point2D ctrl2,double smoothness){
  if (p1 == null) {
    return;
  }
  if (line.getCurrentPoint() == null) {
    line.moveTo(p1.getX(),p1.getY());
  }
  if (p2 == null) {
    return;
  }
  getControlsPoints(p0,p1,p2,p3,ctrl1,ctrl2,smoothness);
  line.curveTo(ctrl1.getX(),ctrl1.getY(),ctrl2.getX(),ctrl2.getY(),p2.getX(),p2.getY());
}

private static void addCurve ( Path2D line , Point2D p0 , Point2D p1 , Point2D p2 , Point2D p3 , Point2D ctrl1 , Point2D ctrl2 , double smoothness ) { if ( p1 == null ) { return ; } if ( line . getCurrentPoint ( ) == null ) { line . moveTo ( p1 . getX ( ) , p1 . getY ( ) ) ; } if ( p2 == null ) { return ; } getControlsPoints ( p0 , p1 , p2 , p3 , ctrl1 , ctrl2 , smoothness ) ; line . curveTo ( ctrl1 . getX ( ) , ctrl1 . getY ( ) , ctrl2 . getX ( ) , ctrl2 . getY ( ) , p2 . getX ( ) , p2 . getY ( ) ) ; }
utility method to add a smooth curve segment to a specified line path .
