Off[General::spell1]; 
Clear[MakeZ,V];
MakeZ[V_] := 
Block[{},
  n = Length[V]-1;
h=Table[a,{n+1}];b=Table[a,{n+1}];
u=Table[a,{n+1}];v=Table[a,{n+1}];
z=Table[a,{n+1}];
For[i=1,i<=n,i++,
        h[[i]] = V[[i+1,1]] - V[[i,1]];
        b[[i]] = 6 (V[[i+1,2]] - V[[i,2]])/h[[i]];
        ];
u[[1]] = 2 (h[[1]] + h[[2]]);
v[[1]] = b[[2]] - b[[1]];
For[i=2,i<=n,i++,
  u[[i]] = 2 (h[[i]] + h[[i-1]]) - h[[i-1]] ^2 / u[[i-1]];
  v[[i]] = b[[i]] - b[[i-1]] - h[[i-1]] v[[i-1]] / u[[i-1]];
     ];
z[[n+1]] = 0;
For[i=n,i>=2,i--,
        z[[i]] = (v[[i]] - h[[i]] z[[i+1]]) / u[[i]];
        ];
z[[1]] = 0;
] ;

MakeSpline[] := 
Block[{},
S = Table[s,{n+1}];
For[i=1,i<=n,i++, 
  S[[i]] := Evaluate[
  N[ z[[i]]/ (6 h[[i]])] ( V[[i+1,1]] - x ) ^3 +
  N[ z[[i+1]] / (6 h[[i]])] (x - V[[i,1]]) ^3 +
  N[ (V[[i+1,2]] / h[[i]] - (z[[i+1]] h[[i]])/6)] 
          (x - V[[i,1]]) +
  N[ (V[[i,2]] / h[[i]] - (z[[i]] h[[i]])/6)]
         (V[[i+1,1]] - x)];
  ]] ;
  
EvalSpline[S_,V_,y_] :=
Block[{val=0},
        For[i=1,i<=n,i++,
                If[V[[i,1]] <= y <= V[[i+1,1]],
                val = S[[i]] /. x->y,0]
           ];val
        ]; 
 
Clear[Parameter,XY,X,Y]
Parameter[XY0_] :=
  Block[{},
  XY=XY0;
  n=Length[XY];
  X=Table[{i-1,XY[[i,1]]}, {i,1,n}];
  Y=Table[{i-1,XY[[i,2]]}, {i,1,n}];
V=X; 
MakeZ[X];
z1 = z;h1 = h; 

V=Y;
MakeZ[Y];
z2 = z;h2 = h;
                
Clear[SX,V,z,h];
V=X;z=z1;h=h1;
MakeSpline[];
SX = S;

Clear[SY,V,z,h];
V=Y;z=z2;h=h2;
MakeSpline[];
SY = S; ];
On[General::spell1];

XY = {{3.2,9},{3.2,5.5},{1.5,1},{1.5,3},{4.5,2},{8.8,2.8},
        {10.2,7},{8.2,11.5},{5.2,12.2},{5,7},{6.5,0}};
Parameter[XY]

curve=ParametricPlot[{EvalSpline[SX,X,t],EvalSpline[SY,Y,t]},{t,0,10},
        Frame->False,Axes->False,AspectRatio->1]

nodes=ListPlot[XY,Frame->False,Axes->False,
AspectRatio->1,PlotStyle->PointSize[.02], 
DisplayFunction->Identity]; 
Show[curve,nodes, DisplayFunction->$DisplayFunction]

Clear[XY,n];
XY = {{1.,-0.2},{0.,0.}, {1.2,1.2}, {7.,2},{10.,4.}, 
{14.,4.5},{18.,4.}, {20.5,2.5},{24.,2.}, {25.,0},
{24,-0.2}};
Parameter[XY];

curve=ParametricPlot[{EvalSpline[SX,X,t],EvalSpline[SY,Y,t]},{t,0,10},
        Frame->False,Axes->False,AspectRatio->0.3]

nodes=ListPlot[XY,Frame->False,Axes->False, 
AspectRatio->1,PlotStyle->PointSize[.02],
DisplayFunction->Identity];
Show[curve,nodes, DisplayFunction->$DisplayFunction]