B - spline Curvatures

Some examples of curvature plots. I cannot Mathematica to take derivatives of B-splines, hence the crude approximations.

knot[n_,ll_]:=Join[Table[0,{i,0,n}],Table[i/ll,{i,1,ll-1}],Table[1,{i,0,n}]];

n=3;  (*degree *)
ll=8; (* number of intervals *)

bscurve[t_]:=Sum[BSplineBasis[{n,knot[n,ll]},i,t]*d[[i+1]],{i,0,n+ll-1}];

first[t_]:=(bscurve[t+0.0001]-bscurve[t])/0.0001;
second[t_]:=(bscurve[t+0.0001]-2bscurve[t]+bscurve[t-0.0001])/0.0001^2;
curvature[t_]:=Det[{first[t],second[t]}]/(Norm[first[t]])^3;

d=Table[{t*Cos[t],t*Sin[t]},{t,0,n+ll-1}];Graphics[{Thick,BSplineCurve[d,SplineKnots->knot[n,ll],SplineDegree->n],Green,Line[d],Red,Point[d]}];

Plot[curvature[t],{t,0.01,0.99},Filling->Axis,AxesOrigin->{0,0},PlotRange->All];

d=Table[{t,Sqrt[t]+0.01Sin[3t]},{t,0,n+ll-1}];Graphics[{Thick,BSplineCurve[d,SplineKnots->knot[n,ll],SplineDegree->n](*,Green,Line[d],Red,Point[d]*)}];

Plot[curvature[t],{t,0.01,0.99},Filling->Axis,AxesOrigin->{0,0},PlotRange->All];

The second derivative (or rather, its magnitude) does not reveal much about curve shape:

Plot[Norm[second[t]],{t,0.01,0.99},Filling->Axis,AxesOrigin->{0,0},PlotRange->All];