O'Reilly logo

Mathematics for 3D Game Programming and Computer Graphics, Third Edition by Eric Lengyel

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 5. Geometry for 3D Engines

This chapter develops the mathematics that describe lines and planes in three-dimensional space, and it discusses topics such as finding the intersection of two such entities and calculating the distance between them. We then introduce the view frustum and examine some of the important mathematics governing the virtual camera through which we see our game universe.

Lines in 3D Space

Given two 3D points P[1] and P2, we can define the line that passes through these points parametrically as

Equation 5.1. 

where the parameter t ranges over all real numbers. The line segment connecting P1 and P2 corresponds to values of ...

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