Getting Acquainted with Lines, Rays, and Normals
Since we covered vectors in the previous chapter, it’s time to jump into exploring the mathematics of lines, rays, and normals. All three can be defined by vectors and on the surface, all appear to be the same and yet they have very specific and differing uses in graphics. Fortunately, their similarities concerning geometric structure allow them to be defined and manipulated by the same equations, as you will discover in this chapter.
The one thing lines, rays, and normals have in common is that they are all straight. This makes them very useful in graphics for defining space, direction, the edges of meshes, distance, collisions, reflections, and much more. The line construct is one of the fundamental drawing operations in graphics, as we covered in Chapter 1, Hello Graphics Window: You're On Your Way, and Chapter 2, Let’s Start Drawing.
In this chapter, we will cover the essential knowledge you need to define...