Implement B-Spline Curve:
There are several ways to implement the above idea. We will look at B-Splines, that are a general form of Bezier. B-splines gives functions of the form :
here Pi are the control points, and the {fi (u), i = 0, . . . , n} are piecewise polynomial functions that make a basis for the vector space of all piecewise polynomial functions of some given degree and continuity at a given set of breakpoints {ui, i = 1, . . . , m}. Note down that continuity (at least with respect to the parameter u) is dictated simply by the basic functions fi (u) - the control points might be modified without influence the continuity. Furthermore, we would like C (u) to possess the convex hull property, along with the coordinate frame invariance property. Another property we desire our fi (u)'s to have is that of local support - every fi (u) is non-zero in just a (given) small number of intervals, however not over the whole domain [u0, um]. As Pi is multiplied by fi (u), moving Pi will just affect the curve shape in the range here fi (u) is non-zero.
All of these and other gorgeous properties are possessed by B-splines. To understand B-splines, we have to first learn the B-spline basis functions. Assume U = {u0, . . ., um} be a non-decreasing sequence of real numbers, i.e., u0 î_ X1 î_ X2 ... î_ Xm. The ui are known as knot points, or just knots, and U is the knot vector. After that the i-th B-spline basis function of degree-p (order p + 1), mentions Ni, p (u), is represents follow: