Chapter 4Transformations

Suppose you are in the modeling stage of the graphics pipeline and the task is to build a car for display on the computer screen. Building an object means that we need to find coordinates for points that delineate various features such as the windshield, the hood, the tires, and so on. Many of these features are curves, so we end up approximating them with very small line segments. Surfaces like the car body are three dimensional, and a mesh of small triangles does the job of approximating their shapes. To specify the line segments and the vertices of triangles, we can use the techniques of vector geometry to make the job considerably easier. However, if the right side of the car looks the same (or almost the same) as the left side of the car, it make sense to simply reflect one side of the car in a plane passing lengthwise down the car's middle. This process of reflection is a type of transformation. When we reach the tires for the car, we can model one tire finding appropriate vertices, but then just apply another transformation, a translation, to copy it from the front to the back of the car. Finally, another reflection transformation will then copy the tire from one side of the car to the other.

Once we have the list of triangles and associated vertices representing the car, we still need to position it in any broader scene; there may well be many other objects. This requires another transformation which will alter all the car's vertex coordinates ...

Get Mathematical Structures for Computer Graphics now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.