CS 4620 Midterm Exam, Exams of Geometry

A CS 4620 Midterm Exam from Cornell University. The exam consists of several questions related to computer graphics, including meshes, cube maps, transformation stacks, and normal interpolation. The exam also includes a statement on academic integrity. a buffer of vertex positions and normals, as well as an index buffer for a given mesh structure.

Typology: Exams

2017/2018

Uploaded on 05/11/2023

thecoral
thecoral 🇺🇸

4.5

(30)

395 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Last Name: First Name: Cornell NetID:
CS 4620 Midterm, March 20, 2018
This 90-minute exam has ?? questions worth a total of ?? points. Use the back of the
pages if you need more space.
Academic Integrity is expected of all students of Cornell University at all times, whether
in the presence or absence of members of the faculty. Understanding this, I declare I
shall not give, use, or receive unauthorized aid in this examination.
Signature: Date
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download CS 4620 Midterm Exam and more Exams Geometry in PDF only on Docsity!

CS 4620 Midterm, March 20, 2018

This 90-minute exam has ?? questions worth a total of ?? points. Use the back of the pages if you need more space.

Academic Integrity is expected of all students of Cornell University at all times, whether in the presence or absence of members of the faculty. Understanding this, I declare I shall not give, use, or receive unauthorized aid in this examination.

Signature: Date

  1. [20 points] Meshes Suppose we are given the geometry shown in the left side of Figure ?? , and we are tasked with collapsing the red edge. This means combining its neighboring vertices into a new vertex. The resulting geometry is given on the right side of the figure. The new vertex’s position will be the average position of the two old vertices. Suppose also that each vertex in this mesh is associated with a normal vector. The new vertex’s normal vector will be parallel to the average of the normals of the old vertices. Below is a buffer that is filled with the positions of each of the vertices of the original mesh:

-1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.2, 0.0, 0.0, -0.2, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0, 0.

We are also given the following normal buffer:

-5/13, 0.0, 12/13, 0.0, 5/13, 12/13, 0.0, 8/17, 15/17, 0.0, -8/17, 15/17, 0.0, -5/13, 12/13, 5/13, 0.0, 12/

Finally, we also have an index buffer. Each grouping of 3 entries describes a single triangle in the original mesh. An entry with value i selects the ith point in the position buffer above, and the ith vector in the normal buffer above. 0, 2, 1, 0, 3, 2, 0, 4, 3, 1, 2, 5, 2, 3, 5, 3, 4, 5

Figure 1: Left: the original mesh structure, with the edge to be removed highlighted in red. Note that this mesh is planar. Right: the resulting mesh structure.

  1. [15 points] Cubemap

Similar to the written question in A4 shaders, imagine we have a cube map with cross-like texture, shown in the figure below.

Figure 2: cube map with cross like texture.

Suppose we have a perspective camera positioned at (0, 0 , −25) looking towards (0, 0 , 0). A square mirror surface 100 by 100 units in size is centered at (0, 0 , 0) with its normal pointing towards −z. The scene is rendered using the cube map as an environment map.

  • (a) Point A (25, 0 , 0) lies on the specular reflecting square. Imagine a viewing ray that intersects the square at A and is specularly reflected. What is the 3D unit vector that will be used to look up in the cube map? At what pixel coordinates will the texture in Figure 2 be sampled?
  • (b) Answer the same two questions for Point B (25, 25 , 0).
  • (c) Answer the same two questions for Point C (50, 0 , 0) on the edge of the mirror.
  • (d) Which part of cube map is reflected by the specular square? Shade in the region in the figure below, marking dimensions so that we can tell exactly which part is shaded. Briefly explain the reasoning behind your answer.
  1. [15 points] Normal interpolation

(a) Explain why we want to interpolate vertex normals for shading.

(b) True or False? For any point on a face ABC, the normal we use for shading is a convex linear combination of the vertex normal vectors na, nb, and nc.^1

(c) Suppose we have a triangle mesh with shared vertex normals, which contains two triangles P QR and RQS that share an edge. What are the barycentric coordinates of the midpoint of the edge QR in each of these two triangles?

(d) Prove using barycentric coordinates that the interpolated normal at any point on the edge QR has the same value when calculated in triangle P QR using the vertex normals np, nq, and nr or in triangle RQS using the vertex normals nr, nq, and ns.

(^1) Reminder: a convex linear combination is a linear combination in which the weights are positive and sum to 1.

  1. [15 points] Ray Tracing Bugs

The image here is a correct ray traced rendering of a scene consisting of a single light, a box, a teapot mesh, a sphere, and a plane (approximated by a box with a small height). The teapot has Microfacet Beckmann shading, and all other surfaces have Lambertian. We have modified the ray tracer to introduce several single-line bugs, one for each image you see on the next page. For each image, choose one of the three possible explanations for the bug:

  • i. The error is caused by a problem with ray generation.
  • ii. The error is caused by a problem with ray intersection.
  • iii. The error is caused by a problem with shading computations.

For each choice, back it up with an example of an error that would cause the observed symptoms. There is no right or wrong explanation; only plausible and implausible ones. But when there is a clearly plausible cause, very far-fetched explanations will not make full credit. Shadow computations and texture operations count as part of shading. Computing surface normals counts as part of ray intersection. The first one is done as an example.

(a) Example: Bug ii: Ray intersection is not properly determining the first object hit.

(b)

(c)

(d)