Graphics Reference
In-Depth Information
Let's watch the hour hand's progress through the modeling transformation. In
Figure 2.19, we see the hand template instantiated with its original geometry; the
hand's image is tiny, since this is prior to display transformation, so our schematic
includes a magnification callout for clarity.
The first modeling transform is a nonuniform scale that produces the desired
shorter, wider shape. The effect of this transformation is the desired hour-hand
shape, as shown in Figure 2.20.
The second modeling transformation rotates it into the desired 7:30 location,
as shown in Figure 2.21.
The hour hand is now ready to be exposed to the display transformation. It
effectively “tags along” with the other members of the scene (clock face and
Application coordinate system
Hand template in its original shape/size
H
x
Scale transform
x by 1. 7 /
x
Scale transform
x by 1.7 / y by 0.7
y by 0.7
Purpose:
Modeling
y
Rotate transform
clockwise 45 degrees
Rotate transform
clockwise 45 degrees
Magniied
view
Application coordinate system
Instance “remodeled” into 7:30 hour hand
Application coordinate system
Instance “remodeled” into 7:30 hour hand
H
Scale transform
by 4.8 on both axes
Scale transform
b y 4.8 on both axes
Purpose:
Display
Translate transform
x :
Translate transform
x :
1
1
48
y :
y :
1
48
48
48
1
WPF canvas coordinate system
WPF canvas coordinate system
Figure 2.19: Instance of hand template, prior to modeling transform.
Application coordinate system
Hand template in its original shape/size
e s yst
yst e em
Hand template in its original shape/size
App
App lic
lic ati
ati o on coo
coo rdi
rdi nat
nat es
H
x
Scale transform
x by 1.7 / y by 0.7
Purpose:
Modeling
y
Rotate transform
clockwise 45 degrees
Rotate transform
clockwise 45 de gre es
Magniied
view
Application coordinate system
Instance “remodeled” into 7:30 hour hand
Application coordinate system
Instance “remodeled” into 7:30 hour hand
H
Scale transform
by 4.8 on both axes
Scale transf orm
by 4.8 on both axes
Purpose:
Display
Translate transform
x :
Translate transform
x :
1
1
48
48
y :
y :
1
48
48
1
WPF canvas coordinate system
WPF canvas coordinate system
Figure 2.20: Instance of hand template, transformed into hour-hand shape.
 
Search WWH ::




Custom Search