CSCI 480/580 Lecture 5 - In-Class Problems

  1. You have a canonical perspective camera (i.e., centered at the origin, looking down the axis, viewport height and width 1, distance to viewport 1). Your image is 400x400 pixels. Generate the viewing ray for the pixel whose index is (100, 200). Write the ray in parametric form (i.e., ). Note: I didn't design this so the numbers would come out nice - feel free to use a calculator and/or software (e.g., the Julia REPL!) to compute the answer.
  1. Out in the scene, there is planar object occupying the entire plane at . What is the value of at the intersection point of the ray with the plane?

  2. Let's break some assumptions and generalize our camera model. We assumed:

    • The eye is at the origin,

    • vh = vw = 1

    • d = 1

    In the following, you may assume that the conversion from to () has been done already - feel free to express your answer in terms of and . For each one, assume that the camera is canonical in all other respects.

    1. Write the viewing ray for pixel in a camera that is canonical except its eye is at a given point .
    2. Write the viewing ray for pixel in a camera with a distance to the viewport.
    3. Write the viewing ray for pixel in a camera with a viewport witdth and height .
  1. If you have time, ponder this: what if the camera's orientation is different, i.e., the camera points in a direction other than the -z axis?