The Quotient Rule

text only
 
progress indicator progress indicator progress indicator progress indicator

In Conclusion

In practical terms, rational curves are very similar to irrational curves. They are in fact a superset of irrational curves. The additional control given by the weighting factors can be extremely valuable and do not increase the overall complexity by that much. If you are serious about using splines, you will probably want to implement NURBS and treat B-splines and Bezier curves as special cases. In fact, in the next section on surfaces, I will only use Bezier and B-spline surfaces to explain the basics. After that, the other surfaces will be based on NURBS. Before moving to surfaces, here's a short review of the ideas in this chapter.

  • NURBS are rational curves, meaning that their basis functions are quotients of two polynomials . In practical terms, this creates a weighting factor for each control point.

  • NURBS are also invariant with respect to all transformations. This means that you could perform transformations on the control points and those transformations will be correctly propagated to the curve points. However, the advent of hardware transforms makes this difficult to exploit effectively.

  • NURBS can be used to correctly represent conic sections. Therefore, NURBS can represent any shape, making them an extremely powerful modeling primitive.

  • Weighting factors change the relative influence of a control point. A weight of zero will result in the point having no effect. A weight of infinity will pull the curve to that control point.

  • Conic sections are the shapes you get if you slice a plane through a cone. I have concentrated on circles because you will often need to draw circles and because it's a good starting shape for many other things.

  • You can build a circle from a series of quadratic curves with three control points each. The simplest form is a triangle with 120 degree arcs, but you can use as many as you need.

  • You can find the derivative by finding the derivatives of the basis functions.

  • The code for this chapter builds on the code from previous chapters. If you build a real application, you will probably want to make the code more efficient. You could divide DefineBasisFunctions into two functions that allow you to change the weighting factors without recomputing the entire basis function.

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