Graphics Reference
In-Depth Information
user wants to scale a teapot object with thousands of vertices, it can be inefficient
to go through all vertices to compute their new positions. In general, it is more
efficient to manipulate the geometry of objects via the transformation operators.
Tutorial 9.9. A Face for Reference
Tutorial 9.9.
Project Name:
D3D _ XformList
Library Support:
UWB _ MFC _ Lib1
UWB _ D3D _ Lib9
Goal. Define a reference object to assist in the studying of coordinate trans-
formation, and have some fun when doing so.
Approach. Draw a face based on simple geometric shapes, and then pro-
gram the face with our library.
Figure 9.20 is a screenshot of running Tutorial 9.9. This tutorial implements the
simple geometric face as defined by Figure 9.21. We will use this as reference
geometry for studying coordinate transformation in Chapter 10.
Figure 9.20.
Tutorial
9.9.
Face
Center=(150,150)
Radius=150
Left Eye
Center=(90, 2 10)
R adius=1 5
Right Eye
Center=(21 0 ,210)
Radius=1 5
Nose
Center=(150,150)
W=60, H=30
Mouth
Center=(150,75)
W=150, H=30
Top Tooth
Cen ter=(18 7 .5,82.5)
W=H=15
Bottom Tooth
C enter=(127.5,67.5)
W=H = 15
Figure 9.21.
Measurements of the simple geometric face.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search