In Conclusion

text only
 
progress indicator progress indicator progress indicator progress indicator

In Conclusion

This chapter has covered many topics, but many of the examples shown are just different flavors of the same basic ideas. If there are concepts you don't understand, try playing with the code to get a better idea of how things work. Take a look at the shape of the basis functions. See what happens when you break some of the constraints (like the range of periodic curves). I have tried to give you a sandbox to experiment with. The concepts found in this chapter permeate almost all of the remaining chapters in this book. Take the time to get a solid understanding before moving on.

As you experiment, here are some important points to keep in mind:

  • B-splines are similar to Bezier curves in that they are computed using a set of basis functions. Unlike Bezier curves, B-spline basis functions give the programmer much flexibility.

  • B-splines are not constrained to a specific order or degree. This gives the programmer more control over the overall smoothness of the curve. The only constraint is that the order must not be more than the number of control points.

  • The knot vector defines the range of influence of the control points. It defines the shapes of the basis functions, which in turn define the relative effect of each of the control points at every point along the curve.

  • B-spline basis functions can be found recursively based on the desired order and the knot vector. If you change the knot vector, you must recompute the basis function curves.

  • The sum of the basis functions at a given value of t must equal zero. In some cases, you will need to limit your parametric range to conform to this rule.

  • The curve equation for B-splines is very similar to the Bezier curve equation. It is the sum of the influence of each control point at the given point on the curve.

  • Knot vectors can be uniform and nonuniform. They can also be open or periodic.

  • Open knot vectors have k multiple knots at either end of the vector. This has the effect of pulling the curve toward the end- points of the control polygon. The Bezier curve is a special case of an open B-spline.

  • Periodic knot vectors produce periodic basis functions. Each basis function is the same shape as the other. This creates convenient continuity properties, but it limits the parametric range of the resulting curve.

  • B-splines offer you more control over the shape of the curve. You can change the order/degree, move the control points, move the knot vector entries, and duplicate control points to produce a wide range of shapes and effects.

  • Open knot vectors are not usually appropriate for closed shapes because of continuity problems at the joined endpoints.

  • Periodic knot vectors are usually better for closed shapes, but they require (k-2) repeated control points in order to increase the parametric range and close the shape.

  • Like Bezier curves, the derivative of a point on a B-spline is dependent on the derivatives of the basis functions.

  • The code for this chapter was written for clarity rather than efficiency. It might be a useful exercise to create an optimized version. Tearing the code apart and putting it back together might help solidify the concepts.

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