| |
|
|
||||
![]() |
||||||
| |
|
|||||
|
Not All is Perfect Bézier curves are very useful and generate good visuals, but there are several problems that do crop up when using them.
A Brief Trip to the Zoo Bézier curves fall into the class of parametric curves, but they are by no means the only form of parametric curves. They are the most common because they are efficient to calculate and intuitive to model with. There are some drawbacks, including the extra effort required to ensure continuity between sections. Another popular parametric curve is the B-spline. The "B" stands for "basis" (not "Bézier"), and these should not be confused with Bézier curves. These are defined as a sequence of control points with continuity guaranteed along them. The blending functions are actually derived by enforcing continuity along the spline. Describing B-splines in any detail is a whole other article. They allow for smoother shapes, but at the cost of increased computation, and they are more difficult to use to model objects, since they do not pass through any of their control points and the control points do not directly affect geometric quantities such as tangent lines. There are several forms of B-spline: uniform and non-uniform, and rational and non-rational. The most famous of these are NURBs, non-uniform rational B-splines. Other forms include Catmull-Rom splines, which pass through all of their control points with the tangent at each point defined and b -splines, which are similar to B-splines, but have two additional parameters that allow for further control over the shape of the curve. It's been a long journey, but I believe worth it. Hopefully you will take what you have learned and add Bézier curves to your projects to generate paths for cameras or to create realistic looking curved surfaces. They are a powerful tool to add to your arsenal. I've included a sample application (including source code) which you can download a experiment with. Enjoy. Gabe Kruger spends his days working at OptoSonics, a medical imaging research company, but spends his nights dreaming of games. He can be reached at gabe@refracted.com. For Further Information Computer Graphics: Principles and Practice (Second Edition) by James Foley, et. al (Addison-Wesley, 1990). This is the bible and a must for anyone interested in computer graphics. Advanced Animation and Rendering Techniques: Theory and Practice by Alan Watt and Mark Watt. (Addison-Wesley, 1992.) Practical coverage of a wide range of topics. http://graphics.cs.ucdavis.edu. A good graphics resource on the web with a lot of material covering parametric curves. Acknowledgements For their support, I would like to thank Brian Hook and Anna Kang of id Software. |
|
|