public static GeneralPath cardinalSpline(float pts[],int start,int npoints,float slack,boolean closed){
  GeneralPath path=new GeneralPath();
  path.moveTo(pts[start],pts[start + 1]);
  return cardinalSpline(path,pts,start,npoints,slack,closed,0f,0f);
}

public static GeneralPath cardinalSpline ( float pts [ ] , int start , int npoints , float slack , boolean closed ) { GeneralPath path = new GeneralPath ( ) ; path . moveTo ( pts [ start ] , pts [ start + 1 ] ) ; return cardinalSpline ( path , pts , start , npoints , slack , closed , 0f , 0f ) ; }
compute a cardinal spline , a series of cubic bezier splines smoothly connecting a set of points . cardinal splines maintain c ( 1 ) continuity , ensuring the connected spline segments form a differentiable curve , ensuring at least a minimum level of smoothness .
