2021 March 10,

CS 311: Exam C Preparation


Exam C is like Exam B: written, open-book, etc. It covers all course material up to and including transmission and translucency. It does not cover the topics that we breezed through on the last day of class. It is focused on material that hasn't appeared on previous exams — that is, shadow mapping and ray tracing.

Our official final exam time is Saturday 7:00 PM - 9:30 PM. I will make the exam available by Saturday 8:30 AM, and you can take it in any two-hour window concluding at Sunday 8:30 AM. The exam is intended to take 60 or 70 minutes, but you are given two hours, to allow for technical glitches and lower stress.

On Thursday and Friday, I have office hours 12:00-2:30. If you cannot make these times — perhaps because you live in a distant time zone — then e-mail me for an appointment.

Here are some study questions, with the usual caveat that they are not carefully crafted, not balanced for difficulty, etc. I split them into just two difficulty categories, rather than the three that I used in our Exam B Preparation. You might want to check out Exam C from winter 2019 too.


A. On the last day of class, I showed you a demo where I clicked on a 3D scene and a snowball appeared wherever I clicked. The snowball was actually placed in the scene. How do I do that? That is, how do I deduce, from the screen coordinates of a mouse click, what the corresponding world coordinates are? Answer in both rasterization and ray tracing. (Although I showed this demo on the last day of class, it relies entirely on earlier material, so this is a fair question for the exam.)

B. In rasterization, in shadow mapping, think about the shader program for the second rendering pass. What extra work must the vertex shader do, compared to the vertex shader before I added shadow mapping? I'm looking for specific calculations, not vague intuitions. What about the fragment shader?

C. In our mesh files, mesh3DInitializeBox constructs a parallelepiped (rectangular box) whose sides are aligned with the local coordinate planes. To ray trace such an object, we could treat it like any other mesh, but doing so would not take advantage of the geometric simplicity of the object. In pseudocode/English/math (not C code), implement a function for performing ray intersection with such an object.

D. Continuing the preceding question: Which seems faster, intersecting a ray with a sphere or with that box?

E. Intersecting a ray with a mesh is expensive. So, in ray tracing a scene containing many meshes, it is common to enclose each mesh in a simpler geometric primitive, for which intersection tests are faster. If the ray misses the primitive, then it need not be tested against the mesh at all. Develop this idea. Which primitive would you choose? Are there tradeoffs? How would you configure the bodyBody to represent such an object in the scene? (Would you need to change the current bodyBody?)

F. How does our ray-tracing algorithm change, if we switch from a perspective camera to an orthographic camera?


A. On the last day of class I showed you a demo where I clicked on a 3D scene and my code detected which object in the scene graph was clicked. How do I do that? Answer in both rasterization and ray tracing.

B. In ray tracing, we've done texture mapping. Is it perspective-correct?

I might post some more questions later, if I think of some good ones.