Clear[B0,B1, B2,B3];
B0[x_] = If[ 0<= x && x <1, 1,0];
B1[x_] = If[0 <= x  && x <2,x B0[x]+ 
 (2-x) B0[x-1], 0];
B2[x_] = If[0 <= x  && x <3,x B1[x]/2+
 (3-x) B1[x-1]/2, 0];
B3[x_] = If[0 <= x  && x <4,
  x B2[x]/3 + (4-x) B2[x-1]/3, 0];

Plot[{B2[x], B2[x-1], B2[x-2]}, 
{x, 0,5},AspectRatio -> 0.25]

Plot[{B3[x], B3[x-1],B3[x-2],B3[x-3]},
 {x, 0,7},AspectRatio -> 0.25]

Clear[XY];
XY = {{0.,1.},{1.,0.},{2.,0.2}, 
{3.,1.}};
Clear[B,BX,BY];
B[t_] = XY[[1]]B3[t+3]+XY[[2]]B3[t+2]+
 XY[[3]] B3[t+1] +XY[[4]] B3[t];
BX[x_] = B[x][[1]];
BY[x_] = B[x][[2]];

Clear[dots]; 
dots = ListPlot[XY,PlotStyle->{PointSize[0.02]},
   DisplayFunction-> Identity];
gr = ParametricPlot[{BX[t],BY[t]}, 
 {t,0,1}, AspectRatio -> 0.5,
     PlotRange -> {{0,3}, {0,1}},
DisplayFunction->Identity];
txt = StringForm["B-Spline Curve and Control Points"];
Show[gr,Graphics[Line[XY]],dots,
DisplayFunction->$DisplayFunction,
PlotLabel->txt];

Clear[XY];
XY = XY = {{0.,0.2},{1.,0.},{2.,0.2},
 {3.,1.},{4.,1.3},{5.,1.3}, {6.,1.}, 
 {5.,0.8}};
Clear[B,BX,BY];
B[t_] = XY[[1]]B3[5t+3]+
  XY[[2]]B3[5t+2]+ XY[[3]] B3[5t+1] +
  XY[[4]] B3[5t]+ XY[[5]]B3[5t-1]+
  XY[[6]] B3[5t-2]+XY[[7]] B3[5t-3] +
  XY[[8]] B3[5t-4];
BX[x_] = B[x][[1]];
BY[x_] = B[x][[2]];

Clear[dots]; 
dots = ListPlot[XY,PlotStyle->{PointSize[0.02]},DisplayFunction->
Identity];
gr = ParametricPlot[{BX[t],BY[t]},
{t,0,1},DisplayFunction->Identity];
txt = StringForm["Bspline Curve and Control Points"];
Show[gr,Graphics[Line[XY]],dots,
DisplayFunction->$DisplayFunction,
PlotLabel->txt];

Clear[XY];
XY = XY = {{5.,0.5},{3.5,0.2},{2.,0.5},
 {3.,1.},{4.,1.3}, {5.,1.3}, {6.,1.}, 
 {5.,0.5}};
Clear[B,BX,BY];
B[t_] = XY[[1]]B3[5t+3]+
 XY[[2]] B3[5t+2]+ XY[[3]] B3[5t+1]+
 XY[[4]] B3[5t]+ XY[[5]]B3[5t-1]+
 XY[[6]] B3[5t-2]+ XY[[7]] B3[5t-3]+
 XY[[8]]B3[5t-4];
BX[x_] = B[x][[1]];
BY[x_] = B[x][[2]];

Clear[dots]; 
dots = ListPlot[XY,PlotStyle->{PointSize[0.02]},DisplayFunction->
 Identity];
gr = ParametricPlot[{BX[t],BY[t]},
{t,0,1}, DisplayFunction->Identity];
txt = StringForm["Bspline Curve and Control Points"];
Show[gr,Graphics[Line[XY]],dots,
DisplayFunction->$DisplayFunction,
PlotLabel->txt];

Clear[XY];
XY = XY = {{5.,0.5},{3.5,0.2},{2.,0.5},  
 {3.,1.},{4.,1.3},{5.,1.3}, {6.,1.},
 {5.,0.5}};
Clear[B,BX,BY];
B[t_] = XY[[1]]B3[7t+3]+
  XY[[2]] B3[7t+2]+ XY[[3]]B3[7t+1]+
  XY[[4]] B3[7t] +XY[[5]]B3[7t-1]+
  XY[[6]] B3[7t-2]+XY[[7]] B3[7t-3]+
  XY[[8]]B3[7t-4]+XY[[2]] B3[7t-5]+
  XY[[3]]B3[7t-6] ;
BX[x_] = B[x][[1]];
BY[x_] = B[x][[2]];

Clear[dots]; 
dots = ListPlot[XY,PlotStyle->{PointSize[0.02]},DisplayFunction->Identity];
gr = ParametricPlot[{BX[t],BY[t]},
{t,0,1},  DisplayFunction->Identity];
txt = StringForm["Bspline Curve and Control Points"];
Show[gr,Graphics[Line[XY]],dots,
DisplayFunction->$DisplayFunction,
PlotLabel->txt];