O'Reilly logo

Pro OpenGL ES for iOS by Mike Smithwick

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 2

All That Math Jazz

No book on 3D programming would be complete without at least one chapter on the mathematics behind 3D transformations. If you care nothing about this, move on—there's nothing to see here. After all, doesn't OpenGL take care of this stuff automatically? Certainly. But it is helpful to be familiar with what's going on inside, if only to understand the lingo of 3D-speak.

Let's define some terminology first:

  • Translation: Moving an object from its initial position (see Figure 2-1, left)
  • Rotation: Rotating an object around a central point of origin (see Figure 2-1, right)
  • Scaling: Changing the size of an object
  • Transformation: All of the above

Figure 2-1. Translation (left) and rotation (right)

2D Transformations ...

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