CSE 681
Winter 2011

due Friday, January 14

Homework #2

PROBLEMS:

  1. (2 pts) Compute the cosine of the angle between the 2 vectors.
    V1 = (3,4)
    V2 = (-1, 2)
    
  2. (2 pts) Compute the distance from the point, P, and (infinite) line, L, defined by the two points:.
    P = (4, 5, 0)
    L = ( (0,3,-1), (5,-1,1) )
    
  3. (3 pts) Compute the reflectance vector given:
    incoming ray = (2,3,-1)
    normal vector = (6,3,2)
    
  4. (4 pts)
    1. Write down the 4x4 matrix for a z-axis rotation of 60 degrees; sin(60) = .87; cos(60) = .5
    2. write down the inverse matrix - form the inverse matrix as the matrix that will undo (i.e. rotate back) from the given rotation.

  5. (2 pts)
    1. Write down the 4x4 matrix for a translation of (-1,-5,3)
    2. Write down the inverse matrix - form the inverse matrix as the matrix that will undo (i.e. translate back) from the given translation.

  6. (2 pts)
    1. Write down the 4x4 matrix for a uniform scale of 1.5
    2. Write down the inverse matrix - form the inverse matrix as the matrix that will undo (i.e. un-scale) from the given scale.

  7. (2 pts)
    1. Write down the 4x4 matrix for a non-uniform scale of (2,1,3)
    2. Write down the inverse matrix - form the inverse matrix as the matrix that will undo (i.e. un-scale) from the given scale.

  8. (3 pts)
    1. Write down the single 4x4 matrix that results when the matrix of #4 is multiplied on its right by matrix of #5 (rotation matrix x translation matrix). Do the matrix multiplication to form a single 4x4 matrix. You need to set up the equation for each term of the 4x4 answer matrix, but don't need to multiply everything out.
    2. Do the same for the inverse matrices