Name ID Grade CSE 332 Midterm 2 Exam Fall 2004 This exam is closed book and notes no cheat sheet is allowed Please do all the problems at least in part This way you can gather partial credit If you have to calculate a result don t just write down a number Show your path of thought and show both symbolic and numerical results where applicable This way in case you miscalculate I can at least give you points for the correct approach Good luck 1 Warm Up a In what cases may you get aliasing mark all that apply When you reduce the size of subsample an image that is uniformly red When you reduce the size of subsample an image that shows vertical red stripes When you enlarge an image that shows vertical red stripes When you smooth an image that shows vertical red stripes When you reduce the size of subsample an image that shows horizontal blue stripes When you run an edge filter mask over an image that shows horizontal blue stripes b How can you prevent aliasing in these cases Blur before you perform the operation Blur after you performed the operation Avoid the operation altogether c What is the better interpolation method Nearest neighbor interpolation Closest color interpolation Trilinear interpolation Parallel coordinate interpolation Tristimulus interpolation d What is a normal vector mark all that apply A vector that according to a Gallup poll is the vector most widely known A vector with 3 components x y z A vector of unit length A vector that is perpendicular to a surface A vector that can be found using methods that are similar to smoothing in images A vector that can be found using methods that are similar to edge detection in images e Where does the positive y axis point in the following figure Draw it into the figure What is the direction of positive rotation around the x axis Draw this into the figure as well x axis z axis pointing towards you f If the opacity of an object is 0 3 what is its transparency 1 2 Anti aliasing Consider the following two 1D images Fill in this table recall frequency 1 period length highest spatial frequency lowest spatial frequency highest subsampling rate without aliasing upper image lower image 2 will blurring reduce aliasing when subsampling rate is 2 yes no 3 Transformations For all tasks below write down the transformations in matrix form that are necessary and multiply the lower left vertex coordinates of the transformed body with it You don t have to perform the actual calculations multiplications etc Just write down what needs to be done in matrix form But be sure to fill in the numerical values For the following figures note that the origin of the coordinate system is in the center of the 0 0 cell a Draw the translation vector that moves the dark body into the new position grey body Write down the transformation matrix and multiply the lower left vertex of the dark body with it y x b Now rotate the grey body from a into the shape indicated by the grey body in the figure below Hint You re rotating about the imaginary z axis Where does the positive z axis point to 45 y 3 x 17 c Finally rotate and translate the dark body from a into the shape indicated by the grey body in the figure above Hint this is a combination of the operations you already did in a and b 3 4 Raycasting and 2D interpolation For the following if you did not bring a calculator simplify the numerical expressions as much as you can In the grid below all unmarked grid points have density value 0 the marked ones have density value 200 as shown Assume the following values for the scene ka 0 2 kd 0 5 ks 0 3 ns 20 Ia IL 1 0 1 0 1 0 Cobj 0 1 1 0 0 2 and the illumination equation CP Cobj ka IA kd IL N L ks IL H N ns where H L E L E y 5 4 3 Light 2 3 2 1 P Eye 3 2 1 1 2 3 1 4 5 6 x density 200 a Suppose you want to trace a ray towards a pixel P Draw the ray into the figure What is the normalized ray direction vector r b Starting at P trace a ray with step size 1 What are the numerical coordinates of the first 5 ray sample points encountered after P c Use bilinear interpolation to find the values of the ray sample points 4 Hint if all 4 grid points around a ray sample point have identical values then you know that the bilinear interpolation is very simple It will be the same value than that of those 4 grid points and then there s no need to go through all the calculations Your probably only have to do a real calculations for one of the 5 ray sample points d Assume you re looking to display the surface with iso value 200 where do you stop the ray d Estimate the normal vector at that point Let s call that point P1 e Calculate the reflected color Ca due to the ambient illumination at point P1 f Calculate the reflected color Cd due to the diffuse illumination at point P1 g Calculate the reflected color Cs due to the specular illumination at P1 h Combine the ambient diffuse and specular colors to calculate the color CP received at P and the eye the color reflected at P1 i What color is this is it a shade of red blue green or white 5 5 Raycasting and 3D interpolation Let s move to 3D Assume that P has coordinates 10 2 2 8 12 4 and falls inside a cubic volume cell that has the following density values at the cell s grid points Show all your steps If you did not bring a calculator and you can t calculate all values numerically do it symbolically but use lots of intermediate variables to save writing time if you need to 40 30 190 y 130 P 200 70 ray x 90 20 z points towards you a What is the interpolated value using nearest neighbor interpolation b Now perform trilinear interpolation We will do this step by step First calculate the grid offsets u v w we called them uu vv ww in the demo c Calculate the linear interpolations along the x axis d Calculate the linear interpolations along the y axis e From this calculate the value of P 6
View Full Document