11

Manipulating the Light and Texture of Triangles

We started drawing triangles back in Chapter 2, Let’s Start Drawing, and added lighting and texturing in Chapter 5, Let’s Light It Up! Now that we’ve covered normals in Chapter 10, Getting Acquainted with Lines, Rays, and Normals, it’s time to put it all together to take a look at how these special vectors are used to manipulate and affect the appearance of triangles.

Normals can belong to vertices and mesh faces. Besides being used to specify which side of a polygon should be rendered, they are also used to calculate how light falls across the surface of a polygon. In this chapter, we will begin by improving on the normal drawing technique discussed in Chapter 10, Getting Acquainted with Lines, ...

Get Mathematics for Game Programming and Computer Graphics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.