O'Reilly logo

OpenGL SuperBible: Comprehensive Tutorial and Reference, Fifth Edition by Jr. Richard S. Wright, Benjamin Lipchak, Graham Sellers, Nicholas Haemel

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 4Basic Transformations: A Vector/Matrix Primer

by Richard S. Wright, Jr.

What You’ll Learn in this Chapter:

• What a vector is, and why you should care

• What a matrix is, and why you should care more

• How we use matrices and vectors to move geometry around

• The OpenGL conventions of the modelview and projection matrices

• What a camera is, and how to apply its transformation

• How to transform a point lights position into eye coordinates

In Chapter 3, “Basic Rendering,” you learned how to draw points, lines, and triangles in 3D. To turn a collection of shapes into a coherent scene, you must arrange them in relation to one another and to the viewer. In this chapter, you start moving shapes and objects around in your coordinate system. ...

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