Computer Science Assessment - Graphic Questions

profileAmazingExpert
homework-2.pdf

11/20/13 CMSC 405 - Homework 2

nova.umuc.edu/~jarc/cmsc405/hw2a.html 1/1

Homework 2

1. (5 pts) Given a 2-D point at position (20, 30), show the results and intermediate steps for a

translation of (10, 35), a rotation of 45 degrees and a scale of (0.5, 2.0). You should use 3 x 3

matrix math for this example. The starting point of your subsequent transformation should be

the output of the previous transformation. Also, you do not need to show matrix math

calculations, but you should show the matrix and the starting points and the results for each

geometric transformation.

2. (5 pts) Given a line segment with endpoints (2. 5) and (9, 15), provide the equation for that line

segment using a parameterized representation. Determine whether the point with a x ordinate

of 8 and the point with a y ordinate of 20 are within that line segment. Show how you made

the determination. Explain the role of such calculations in clipping algorithms.

3. (5 pts) Given a 3-D point at position (20, 35, 10), determine the coordinates of the point that

results from rotating the original point 90 degrees around the axis defined by the vector (1, 1,

1). Use the formula:

P2 = Rx -1(α) Ry

-1(β) Rz(θ) Ry(β) Rx(α) P1

Show each of the intermediate matrices. Refer to section 9-1 of the textbook for the details of

how matrices are calculated. Because no translations are involved, you can use 3 x 3 matrix

math for your calculations.

4. (5 pts) Using quaternions, determine the final transformed location of at point at position (10,

30, 15), after a 45-degree rotation about the z-axis, 90-degree rotation about the x-axis and

180-degree rotation about the y-axis. Be sure to show your work including the quaternion

values for all steps.