Project 2 / Phase 1

 CS559 - Project 2, Phase 1

Transformations Homework

This written/theory homework is due Monday, March 1st before 2.30pm

If you write out the assignment by hand, you can either handin the paper in class, or place it in his mailbox on the 5th floor (remember, the elevators are locked after 5pm).

IIf you type your answer, you can email them to the TA make sure to include your name on the assignment.

Note: many of the questions here come from old exams and assignments, so you can find the answers on the web. We discourage you from reading the answers as you can't do so when taking exams.

We actually prefer if you leave your answer in fractional / irrational form. (So sqrt(3)/2 is preferred to 0.86602540378443864676372317075294.

Rotations are always counter clockwise. To see what the rotation around an axis does, stick your right thumb in the direction of the axis - your fingers will curl in the direction of rotation.

 

Question 1

Give a 4x4 (homogeneous for 3D) matrix that performs a rotation such that the Z axis points towards the point (0,1,1) and the Y axis points towards the point (0,-1,1). (hint - where does the X-Axis point?)

Question 2

An object is rotated 180 degrees around its Y axis. It is then rotated -135 around its X axis.

Question 3

A vertex (point) is drawn at the origin. It is viewed through a camera that is positioned with the viewing matrix:

1/2 -1/2 0 -2
1/2  1/2 0 -2
0      0 1  3
0      0 0  1

The object that the vertex is drawn with transformation matrix:

0 -1 0 3
1  0 0 4
0  0 1 5
0  0 0 1

This simple projective transform matrix is used:

1 0  0 0
0 1  0 0
0 0  0 1
0 0 -1 0

Where does the point appear in screen coordinates? (give the x,y position)

Question 4

In this question, we will be making pictures of a cube. The cube is of unit size (that is, all of its edges have length 1), and is placed such that one of its corners is at the origin, and the edges follow the positive axes. There is a letter painted on each side of the cube. The letter “F” is painted on the front, “B” on the back, “L” on the left, “R” on the right, “T” on the top, and “U” on the underside (bottom). The back of the object is the xy plane (z=0), the front of the object is the xy plane with z=1. Left and right are defined as if you were looking at the object from the front. Several views are shown below.

Sketch the view of the cube as seen by the cameras specified, being sure to label each face with the appropriate letter in roughly the right orientation. VRP is the view reference point (the center of the image plane) and Look At is a point along the view plane normal. Assume some reasonable field of view big enough to fit the entire cube in the view, and that the viewport is square. You need not get the view exactly (in fact, you can’t since we didn’t tell you what the field of view is).

(note: if you think of the VRP as the "lookat" or "eye" point, you will get the same answer for this question)

4A) VRP 6,0,0; Look at 0,0,0; VUP 0,1,0.

4B) VRP -6,1,1; Look at: 1,1,1; VUP 0,0,1.

4C) VRP -6,6,6; Look at 0,0,0; VUP 0,0,1.

Question 5:

Consider a 3D transformation M (a 4x4 homogeneous coordinate matrix) that is created by composing a rotation and a uniform scale. M maps the unit X vector to (0,1,1), and the unit Y vector to (0,1,-1).

Question 5A:

Where does M map the unit Z vector to?p>

QuQuestion 5B:

What is the amount of the scale used to make M?p>