Skip to main content

CG Homework 9 solution

  1. (10 pts) Look at Figures 6.37 and 6.38 on pages 310 and 311 of the textbook. Write 50-100 words on why they look different.

    The first figure is rendering flat triangles. The JS program computes the true normals at the vertices of each triangle. Since the triangle is flat, the three normals are the same. They're sent to the vertex shader to compute the shading. So, each triangle is all the same shading, and is clearly different from its neighboring triangles.

    The second figure uses the fact that the triangles are an approximation to a sphere. The normals at the triangle vertices are the true normals to the sphere. So, the vertex shader computes different shades for each vertex of a triangle and that gets interpolated throughout the triangle. Thus the triangles are smoothly shaded and adjacent triangles have the same shading on their common edge.

  2. (10 pts) Look at Figure 6.39 on page 314 of the textbook. What is it about the spheres that the global model looks different from the local?

    The spheres can shadow each other. Ray tracing does this.

  3. (10 pts) Consider the sphere \(x^2+y^2+z^2=169\). What is the normal to the sphere at the point (-12,3,-4)? Be sure your normal is normalized.

    \(\frac{(-12,3,-4)}{\sqrt{144+9+16}} = (-12/13, 3/13, -4/13)\)

  4. (10 pts) Consider a block of glass with index of refraction 1.5. Some light is shining straight down on it. This is called normal incidence. How much of the light reflects off the glass and how much transmits into the glass? Hint: Use Fresnel's law.

    reflect: \(\left(\frac{1.5-1}{1.5+1}\right)^2 = 0.04\)

    transmit = .96

  5. (10 pts) A small light source that is twice as far away is 1/4 as bright. That is, there is an inverse square fall off for brightness. However, when modeling light in graphics, we usually don't do that. Why?

    1. The effect is too harsh, with small very bright regions and large dark regions.
    2. Ambient light means that the total brightness falloff is less than quadratic.

(Total: 50 points.)