ABSTRACT

T he goal for this chapter is to systematically study the modeling of objects in 3D space in order to be able to populate the movies, games and other scenes that we create.

As OpenGL has only straight and flat drawing primitives, curved objects must necessarily be approximated. We’ll develop general strategies to manufacture approximations of both curves and surfaces. We’ll examine in depth certain special classes of curves and surfaces especially important in applications. Particular attention will be paid to Be´zier primitives because of their utility, as well as the easy-to-use OpenGL syntax available to code them. Another popular class we’ll study is that of fractals. Although we’ll delve into some of the mathematics underlying curves and surfaces, we’ll never be far from practical code: throughout this chapter are numerous illustrative programming examples and exercises.