Pro OpenGL ES for iOS

(singke) #1

Chapter 2


All That Math Jazz


No book on 3D programming would be complete without at least one chapter on the
m a t h e m a t i c s b e h i n d 3 D t r a n s f o r m a t i o n s. I f y o u c a r e n o t h i n g a b o u t t h i s , m o v e o n -----
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)

Free download pdf