O'Reilly logo

Computer Graphics Through OpenGL, Second Edition, 2nd Edition by Sumanta Guha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8

Triangulation

To create a 3D object in CG one assembles its surface, or a good likeness, with help of 2D primitives. For example, the (seemingly 3D) solid ball and torus in Figure 8.1 are depicted by the 2D surface sphere and surface torus which bound them, respectively (note that the calls glutSolidSphere() and glutSolidTorus() in ballAndTorusShadowed.cpp refer to filled triangles, not solid 3D objects). Boris’s head in Figure 8.2 is a mesh of quads.

Figure 8.1:

Figure Showing Screenshot of ballAndTorusShadowed.cpp.

Screenshot of ballAndTorusShadowed.cpp.

Figure 8.2:

Figure Showing Mesh of Boris’s head (courtesy of Sateesh Malla at www.sateeshmalla.com).

Mesh of Boris’s head ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required