public static GeneralPath cardinalSpline(GeneralPath p,float pts[],float slack,boolean closed,float tx,float ty){
  int npoints=0;
  for (; npoints < pts.length; ++npoints)   if (Float.isNaN(pts[npoints]))   break;
  return cardinalSpline(p,pts,0,npoints / 2,slack,closed,tx,ty);
}

public static GeneralPath cardinalSpline ( GeneralPath p , float pts [ ] , float slack , boolean closed , float tx , float ty ) { int npoints = 0 ; for ( ; npoints < pts . length ; ++ npoints ) if ( Float . isNaN ( pts [ npoints ] ) ) break ; return cardinalSpline ( p , pts , 0 , npoints / 2 , slack , closed , tx , ty ) ; }
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 .
