Graphics Programs Reference
In-Depth Information
1
Transformations
When working on computer graphics projects, we discover very quickly that transfor-
mations are an important part of the process of building an image. If an image has
two identical (or even similar) parts, such as wheels, only one part need be constructed
from scratch. The other ones can be obtained by copying the first and then moving,
reflecting, and rotating it to bring it to the right shape, size, position, and orientation.
Often, we want to zoom in on a small part of an image so more detail can be seen.
Sometimes it is useful to zoom out, so a large image can be seen in its entirety on
the screen, even though no details can then be discerned. Operations such as moving,
rotating, reflecting, or scaling an image are called geometric transformations and are
discussed in this chapter for two and three dimensions.
1.1 Introduction
Mathematically, a geometric transformation is a function f whose domain and range are
points. Wedenoteby P a general point before any transformation and by P the same
point after a transformation. The notation P = f ( P )impliesthatthetransformed
point P is obtained by applying f to P . We call our transformations geometric because
they have geometric interpretations. Thus, only certain functions f can be used. Years
of study and practical experience have shown that in order for it to be meaningful as a
geometric transformation, a function must satisfy two conditions: it has to be onto and
one-to-one .
A general function f maps its domain D into its range R . feverypointin R
has a corresponding point in D , then the function maps its domain onto its range. An
example is f ( x )=
, which maps the real numbers onto the integers. Every integer
has a real number (in fact, infinitely many real numbers) that map to it. Another
example is g ( x )=1 /x , a mapping from the real numbers into the real numbers. This
x
 
Search WWH ::




Custom Search