Transformations & Coordinate Systems

We can measure an object's location in any number of coordinate systems.

In the coordinate system defined by the axes X & Y, the lower-left corner of the triangle is at (0.5, 0.5).

In the coordinate system defined by the axes X' & Y', it's at (0, 0).






A transformation can be thought of as a conversion from one coordinate system to another.

e.g., glTranslatef(0.5, 0.5, 0.0) transforms points from the X', Y' coordinate system to the X, Y coordinate system.



In other words, our program might "start out" using the X, Y coordinate system.

If the triangle is measured in X', Y' coordinates, then glTranslate converts it into the X, Y coordinates for OpenGL to draw.





This view can be useful when creating complex objects out of multiple parts.

Or when performing composite transformations - e.g. to rotate an object about its center.