| |||||
Finding the derivative of a point on a B-spline is conceptually the same as finding the derivative on a Bezier curve. You must first find the derivatives of the basis functions. Finding the derivative of Equation 4.1 is slightly more involved and requires more calculus than what I have given you in Appendix A. If you do apply a little more calculus, you get the derivative shown in Equation 4.9.
(4.9) Recursive equation for the derivative of a basis function. |
Using this new equation, you can solve for the derivatives of a curve the same way you solve for points along the curve. The derivatives of the first-order basis functions are zero for all values of t, so you can use that to begin the recursive calculations at the second-order functions. The code needed to visualize the slope of the curve is included with all of the sample applications.
Up to this point, I have talked about this mathematically or in the abstract. It now seems like a great time to talk about the actual implementation.
| |||||