Chapter 3: Parametric Equations and Bezier Curves

text only
 
progress indicator progress indicator progress indicator progress indicator

Finding Derivatives of Bezier Curves

A discussion of higher levels of continuity necessarily leads to a discussion about how you find the derivatives of points on Bezier curves. Earlier in this chapter, Equation 3.3 demonstrated how you can find the 2D slope of a parametric equation by first finding the derivatives with respect to t. Bezier curves are no different other than the fact that their derivatives are more complicated than the linear form shown in Equation 3.4.

Equations 3.5 and 3.6 expressed the location of a point along a curve as a function of t and the set of control points. In the context of a derivative with respect to t, the control points are constants. Also, the equation for a Bezier curve is just the sum of these points multiplied by the results of their basis functions. Appendix A tells you that the derivative of a sum is the sum of the derivatives. If you put this all together, you will see that the equation for the derivative at any point on the curve is shown in Equation 3.9.

(3.9) Equation for the derivative with respect to t. 

Now, you just need to find the derivatives of the basis functions. If you have had a calculus class, you know some more straightforward methods for solving for the derivatives for the basis functions shown in Equation 3.8. If not, you can expand the basis functions out to their polynomial form and find the derivative as explained in Appendix A. This method would yield the derivatives shown in Equation 3.10.

(3.10) The derivatives of the basis functions. 

Between Equations 3.9 and 3.3, you have all the pieces you need to find dy/dx, or the 2D slope at any point on the Bezier curve.

progress indicator progress indicator progress indicator progress indicator


Focus on Curves and Surfaces
Focus On Curves and Surfaces (Focus on Game Development)
ISBN: 159200007X
EAN: 2147483647
Year: 2003
Pages: 104
Authors: Kelly Dempski

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net