An algorithm for generating the B-spline basis is given in de Boor (1978, pp. 134 -135). B-splines are both a computationally accurate and efficient way of constructing a basis for piecewise ...