Homework 5, due Thurs Oct 4

Hand in your solution on RPILMS. Each team should submit their solution under only 1 student's name. The other student's submission should just name the lead student. (This makes it easier for us to avoid grading it twice.) For programming exercises, hand in code and screen dumps. We won't run your code, but will use the screendumps to judge how it worked.

This homework has no programming. Use any tool that you wish for the multiplications, e.g., Matlab. Include a copy of the relevant part of the session.

1. (2 pts) Write the 4x4 matrix for a translation by (0,3,1).

2. (2) Apply it to the 3D point (1,0,1).

3. (2) Write the 4x4 matrix for a multiplication about the Y axis by 90 degrees.

4. (2) Apply it to the answer from question 2.

5. (2) Multiply the matrices that are the answers to questions 1 and 3, with 1 being on the right.

6. (2) Apply that matrix to the point (1,0,1). The answer should be the same as question 4.

7. (2) Why is it useful that translation be a matrix multiplication?

8. (2) Two ways to animate are to use an idle callback and a timer callback. (Since we haven't discussed these in class, you will need to research them.) One of these is more likely to give the same animation when run on a machine that is faster and has a higher refresh rate. Which is it and why?

9. (2) Suppose that you specify two colors before drawing a point thus:

glColor3f(1.,0.,1.); glColor3f(0.,1.,0.); glVertex3f(10.,20.,30.);

What color is the point? E.g, do the magenta and green mix to make the point white?

10. (2) Suppose the you draw a second point w/o specifying the color again. What color is this point? E.g., does it revert to black?

11. (2) (Reverse engineering rotations) In 2D, if the point (2,-1) rotates about the origin to (1,2), what's the angle?

Total: 22