Page 1 of 11 Queen s University CISC 454 Final Exam April 19, 2005 2:00pm Duration: 3 hours One two sided aid sheet allowed. Initial of Family Name: Student Number: (Write this at the top of every page.) There are 7 questions and 64 marks total. Answer all questions. This exam paper should have 11 pages, including this cover page. 1 Short Answer / 18 2 Rendering Hierarchical Models / 6 3 PVS Compression / 6 4 Curve Fitting / 8 5 Binary Space Partitions / 8 6 Local Illumination / 8 7 Volume Rendering / 10 Total / 64 The candidate is urged to submit with the answer paper a clear statement of any assumptions made if doubt exists as to the interpretations of any question that requires a written answer.
CISC 454 Final Exam, April 19, 2005 Page 2 of 11 Student Number: 1 Short Answer 18 points 1. (2 points) Briefly explain how double buffering works and what effect it has. 2. (2 points) How much storage is required for a mip-map of size 128x256? Show your work. 3. (2 points) When raytracing a scene with purely diffuse surfaces, how many bounces does each ray make? Explain.
CISC 454 Final Exam, April 19, 2005 Page 3 of 11 Student Number: 4. (4 points) Consider a cube in the Viewing Coordinate System (VCS) aligned with the three camera axes. That cube takes on a different shape when transformed to the Normalized Device Coordinate System (NDCS). Draw a picture of a two dimensional z, y slice of the NDCS containing the transformed cube. Explain why the transformed w w cube is shaped as you have drawn it. 5. (4 points) Given a parametric line, l(t) = p + td (for point p and vector d), and the implicit equation of a plane, x n = k (for scalar k and point x) calculate the intersection of the ray with the plane. Show all of your work.
CISC 454 Final Exam, April 19, 2005 Page 4 of 11 Student Number: 6. (4 points) Consider a ball that is thrown upward (in the positive y direction) and slightly forward (in the positive x direction). The ball follows a parabolic arc until it comes back to hit the grond. Draw the ground and the parabolic arc. Draw five control points to define a Catmull Rom curve that closely approximates the arc. Explain your choice of points.
CISC 454 Final Exam, April 19, 2005 Page 5 of 11 Student Number: 2 Rendering Hierarchical Models 6 points Consider a hierarchical model in which object O i stores T i, the transformation that maps points in O i s coordinate system to the coordinate system of O i s parent, C i, the list of objects that are children of O i, and G i, the geometry of O i Write in pseudocode a procedure that renders a hierarchical model, given the root object of the hierarchy. The procedure is called as rendermodel( O i ) where O i is the root object. Let T be the current transformation matrix. Transformation matrices can be pushed and popped from a stack. Geometry can be rendered with a call to rendergeometry( G i ) Don t use OpenGL commands. Just use high level pseudocode.
CISC 454 Final Exam, April 19, 2005 Page 6 of 11 Student Number: 3 PVS Compression 6 points Apply two steps of lossless compression to the following visibility matrix. Choose the compression to minimize the number of ones in the final, compressed matrix. Indicate clearly what is being compressed at each step. Show the augmented matrix after each step. 1 2 3 4 5 6 7 8 9 a 0 1 0 1 1 1 0 0 0 b 0 0 0 1 1 0 0 0 0 c 1 1 0 0 1 1 0 1 1 d 1 1 1 1 1 0 0 0 0 e 1 1 0 0 0 1 1 0 0 f 0 0 0 0 0 1 1 1 1 g 0 1 0 0 1 1 0 1 0
CISC 454 Final Exam, April 19, 2005 Page 7 of 11 Student Number: 4 Curve Fitting 8 points Derive the equation of a quadratic curve, q(t), passing through three points, x 1, x 2, and x 3 at parameter values 0, 1, and 2, respectively. Show your work. You ll have to solve a very small (2 2) system of equations.
CISC 454 Final Exam, April 19, 2005 Page 8 of 11 Student Number: 5 Binary Space Partitions 8 points Part A (4 points) Draw four segments below. Label the four segments a, b, c, d. Draw and label an origin. Draw the BSP that results when the segments are inserted in order a, b, c, d. You must choose segments so that at least two segments are split when they are inserted. Part B (2 points) Draw and label a viewpoint on your diagram above. List the segments (or pieces of segments) in the order that they are rendered from that viewpoint using your BSP. Part C (2 points) Consider a BSP of n segments in the plane. Suppose that when the n segments were inserted into the BSP tree, k splits occurred. How many separate regions are there in the partition of the plane induced by the BSP?
CISC 454 Final Exam, April 19, 2005 Page 9 of 11 Student Number: 6 Local Illumination 8 points The BRDF, f(ω in, ω out ), takes two vectorial parameters: the incoming light direction, ω in, and the outgoing light direction, ω out. (Both directions point out of the surface.) Part A (3 points) For the definition of the BRDF given in class (i.e. it s the ratio of the outgoing intensity to the incoming intensity) write a BRDF function for purely diffuse reflection. Let N be the surface normal. Use the parameter k d in your function. f diffuse (ω in, ω out ) = Part B (5 points) Write a BRDF function for purely specular reflection. Use the parameters k s and n in your function. You might have to intorduce some new vectors. If so, define them in terms of the known vectors: ω in, ω out, and N. f specular (ω in, ω out ) =
CISC 454 Final Exam, April 19, 2005 Page 10 of 11 Student Number: 7 Volume Rendering 10 points We saw DRR and surface volume rendering in class. Another volume rendering method accumulates the gradients along each ray through the volume. With this method, the usual equation, I i = α i C i + (1 α i )I i+1, is replaced with a new equation: I i = I i+1 + (1 τ d ) where τ is the gradient vector, d is a unit vector in the direction along the ray, and the notation x means the absolute value of x. Assume that the maximum length of the gradient vector is one. Part A (4 points) I 0 is the intensity on the ray leaving the volume toward the eye; the pixel is given this intensity. With the new equation, what characterizes the volume along the ray when I 0 is large? Also: why is this new equation useful when rendering CT volumes of bones?
CISC 454 Final Exam, April 19, 2005 Page 11 of 11 Student Number: Part B (4 points) Modify the following DRR code to implement the new equation. Make your changes by writing on top of the code. Show where you would delete code, add code, and modify code. You can get the gradient, τ, with a call to vol->gradient(pos). You don t need to write correct C++ code; use pseudocode where necessary. float distbetween = (exitpoint - entrypoint).length(); vector L = vector(1,1,1); // back lighting for (float t=distbetween; t>0; t = t-slicespacing) { vector pos = entrypoint + t * raydir; // sample position float tau = vol->texel( pos ); float alpha = slicespacing * tau; } L = (1-alpha) * L; return L; Part C (2 points) The new equation does not use alpha blending. What problem might occur when I 0 is used to set the intensity of a pixel? What can you do to resolve this problem?... End Of Final Exam