# main-written2

## Written Assignment 2

Due Wednesday, September 29th.

Note: if you want to turn this on “typed” (via email), you do not need to include the sketches for question 2 (all other answers are just text).

To turn things in by email, send it to the TA (sghosh@cs), be sure to make the subject line be your cs id and “Written 1” (so for me, it would be “`gleicher Written 1`”)

Otherwise, you can give it Subhadip on paper, or put it in his mailbox on the 5th floor of CS. Note: you might not be able to get to his mailbox after 5pm unless you have a building access key.

We actually prefer email submissions.

It’s preferable to write things as radicals (such as sqrt(2)) or fractions.

## Question 1

A 3x3 matrix is a rotation. The elements are:

```    1 0 0
a b c
d e f
```

1A) what values must A and D have?

1B) if B is sqrt(2)/2, what values can C have?

1C) if B and C are both sqrt(2)/2, are E anf F?

## Question 2

If there’s a rotation matrix

```    0 1/2        x
1 0          y
0 sqrt(3)/2  z
```

What is X,Y,Z?

## Question 3

A vertex 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 2 0 0 0 1

The object that the vertex is drawn with transformation matrix:

 0 -1 0 2 1 0 0 4 0 0 1 6 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

(hint: we did this in class quickly, but it is also done in the book)

A camera is placed with its “look from” point at (5,5,5). It is looking such that the point (5,0,0) is in the center of the screen, and the vector (0,1,0) appears to be vertical in the resulting image. What is the camera matrix?