• Practical Guide to Bezier Surfaces

Math and Physics

This is meant as a beginning guide to Bezier surfaces and some ways to implement them in practical code. This isn't meant as a thorough exploration of the mathematics, but as a jump-off point. I'm sure others here know more than I do, but I'd like to introduce some things here that can be helpful to those who want to delve into this topic. If you're not familiar with the Bezier formulation for curves, please read "The Practical Guide to Bezier Curves" article first.

The Bernstein Basis Functions

The quickest way to do a single evaluation of a point on the Bezier surface is to evaluate the Bernstein basis functions directly. Recall the formal Bernstein basis function form: $B(t) = \binom{n}{i} (1-t)^{n-i} t^i$ Naive evaluation will take a long time computationally, especially considering that the binomial term is often expressed in terms of factorials. Let's see if we can't use a trick or two to cut this down. Bernstein basis functions have some unique properties. Leveraging these properties will help us do more quick evaluations. Here's a short list of the properties of Bernstein basis functions:
• Nonnegativity: $$B_{i,n}(u) \geq 0 \,\, \forall i,n \, \text{and} \, 0 \leq u \leq 1$$
• Partition of Unity: $$\sum \limits_{i=0}^n B_{i,n}(u) = 1$$
• Endpoint Interpolation: $$B_{0,n}(0) = B_{n,n}(1) = 1$$
• Single Maximum: $$\text{max} \left ( B_{i,n}(u) \right ) \, \text{at} \, u=\frac{i}{n}$$
• Recursive: $$B_{i,n}(u) = (1-u)B_{i,n-1}(u) + uB_{i-1,n-1}(u),\,\,B_{i,n}(u) = 0 \, \text{if} \, i \le 0 \, \text{or} \, i \ge n$$
• Derivative: $$\prime{B}_{i,n}(u) = n \left ( B_{i-1,n-1}(u) - B_{i,n-1}(u) \right ), \, B_{-1,n-1}(u) = B_{n,n-1}(u) = 0$$

Conclusion

Now you should have enough knowledge to be able to make cool-looking Bezier surfaces! There are other techniques to generate surface points and normals, but this should get you started. Experiment around and if you've got other neat tricks for Bezier surfaces, let us all know!

Article Update Log

28 May 2014: Updated article to include Bernstein basis functions 04 Aug 2013: Updated equations to work with MathJax 09 Jul 2013: Initial release

References

A lot of the information here was taught to me by Dr. Thomas Sederberg (associate dean at Brigham Young University, inventor of the T-splines technology, and recipient of the 2006 ACM SIGGRAPH Computer Graphics Achievement Award). The rest came from my own study of relevant literature. The images were taken from Dr. Sederberg's book, Computer-Aided Geometric Design.

Report Article

User Feedback

You need to be a member in order to leave a review

Create an account

Register a new account

0 of 1 member found this review helpful 0 / 1 member

• Latest Published Articles

• Postmortem: I Am Overburdened, Recaps and Numbers

Spidi provides a fully detailed breakdown of the development and business results of the release of "I Am Overburdened".
• 373 views
• A LinkedIn Profile for Job Hunting and Networking

Marc Mencher GameRecruiter http://www.gamerecruiter.com Marc Mencher is founder and CEO of GameRecruiter and author of Get in the Game!, an instructional book on building a career in the video game industry. In this first in a series of articles on managing your career in the games industry, Marc offers advice on creating a LinkedIn profile for job hunting and networking.
• 1 comment
• 1106 views
• Android Debugging with Visual Studio Code

Eric Shaw Learn how to use Visual Studio code to debug native Android applications.
• 1 comment
• 1855 views
• 3 Game Design Mindsets

Cody Red http://www.xnahub.com Unless you are tracking, planning, and hitting your KPIs (the only things that matter in the initial phase), you’ll easily get sidetracked, overwhelmed, start looking at the wrong things, make bad design decisions, and eventually, lose focus.