Tutorial Exercise 2

advertisement
Tutorial Exercise 2
CS3162 Introduction to Computer Graphics
Helena Wong, 2000
1. Translate a triangle with vertices (10,20), (10,10), (20,10) by tx=5, ty=10 and then rotate it about
the origin by 30 degrees. Compare the result with the one obtained by reversing the operations:
(3.66,32.32), (8.66,23.66), and (17.32,28.66) by plotting the original triangle together with these 2
results.
2. Define the y-direction shear in matrix form, with a shearing parameter shy, relative to the y-axis.
3. In 3D, what are the steps to perform scaling with respect to a selected fixed position?
1
Tutorial Exercise 2
CS3162 Introduction to Computer Graphics
Helena Wong, 2000
4. Scale a triangle with vertices at original coordinates (10,25,5), (5,10,5), (20,10,10) by sx=1.5,
sy=2, and sz=0.5 with respect to the centre of the triangle. For verification, roughly plot the x and
y values of the original and resultant triangles, and imagine the locations of z values.
5. What are the steps to perform a 3D rotation?
6. Using the CMY and HSV models, construct the following colors.
Result Color
Red
White
Black
Yellow
Pink
Purple
Cyan
0%
CMY Model
Magenta
Yellow
100%
100%
Hue
0°
HSV Model
Saturation
100%
Value
100%
In the cases using the CMY model, what is the effect if black is added (CMYK model)?
2
Download