Graphics Reference
In-Depth Information
and the results of the resizing would, as expected, be V cs :
V cs = x cs y cs
=
dx i =2
dy i =3
V c S
(
3
,
0
.
5
)
dx o =6
Input
Points
= x c ×
s y
dy o =1.5
s x y c ×
= 1
5
×
35
×
0
.
= 32
5 .
.
Output
Points
Figure 8.7 shows that if we examine the relative distances between the two input
points (i.e., V a and V c ), we see that the distance in the x -direction is dx i :
Figure 8.7. Relative dis-
tances between input and
output points.
= |
| = |
| = |−
| =
,
dx i
x c
x a
1
3
2
2
whereas the distance in the y -direction is dy i :
dy i
= |
y c
y a
| = |
5
8
| = |−
3
| =
3
.
When we compare these distances to those of the output points (i.e., V at and V ct ),
we observe the x and y direction distances to be dx o and dy o :
dx o = |
x cs
x as | = |
3
9
| = |−
6
| =
6
,
dy o
= |
y cs
y as
| = |
2
.
5
4
| = |−
1
.
5
| =
1
.
5
.
We observe that
dx o =
s x ×
dx i =
3
×
2
=
6
,
.
We see that when we apply the same scale operator to V a and V c , in effect we
are also applying the scale operator on the distances between these points. In this
dy o =
s y ×
dy i =
0
.
5
×
3
=
1
.
5
Scaling operator. Changes
the x and y size of objects ac-
cording to the scale factors.
way, by repositioning each individual point, we have resized the relative distances
between these points. Figure 8.8 shows applying the S
(
3
,
0
.
5
)
operator on four
vertices that form a rectangle:
V a =(
3
,
8
) ,
V b =(
1
,
8
) ,
Input points :
V c =(
1
,
5
) ,
V d =(
3
,
5
) .
We see that the scale operator will reposition the input points to
V as =
V a S
(
3
,
0
.
5
) ,
V bs =
(
,
.
) ,
V b S
3
0
5
V cs
=
V c S
(
3
,
0
.
5
) ,
V ds =
V d S
(
3
,
0
.
5
) ,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search