2-d Transformations

Transformations

The graphics system we have developed so far has the ability to display points and lines within a clipping rectangle. However, it does not lend itself to a very structured description of the set of objects visible on the display screen.

For example, if I wish to display two identical objects on the display, but offset one of them relative to the other, the only recourse I have is to plot each one completely separately.

This approach is highly inefficient. The obvious structure in the picture is ignored. It would be much better if I could describe the scene as two instances of a particular graphics object.

This is what we have in the above. The computer memory contains a sequence of instructions telling it how to display a ``general'' triangle relative to that triangle's own, private, co-ordinate system. This ``general'' triangle (in light blue) is not displayed. Instead, two instances of it are generated by transforming, in a systematic way, the endpoints making up the triangle.

The light blue triangle is like a subroutine in a computer program, it contains instructions to do a particular job (in this case to draw a triangle). The transformations applied to draw the red triangles which appear on the screen are like two calls to the triangle subroutine with different parameters.

The ``subroutine'' which draws a ``generalised'' triangle is often called a segment or segment description in computer graphics.

The co-ordinate system which the segment is defined in is called the object co-ordinate system. The co-ordinate system in which the red triangles are plotted so that they appear beside one another is called the world system.

The study of how to move the segment so that it appears in a particular place in the world co-ordinate system, with a particular size and orientation, is the study of graphics transformations.

There are three important transformations (plus lots of other ones which aren't as useful). These are Translation, Rotation and Scaling.


From Colin Flanagan -- see details
26.11.1996