CG Homework 4, due Thu 2017-10-05 2359

(No programming this week).

  1. (2 pts) Put the following in the correct order for the graphics pipeline.

    fragment-shader primitive-assembly rasterizer vertex-shader

  2. (2) If you wanted to read some user input and then change all the vertex positions by multiplying each x-coordinate by some amount, the most efficient (in machine time) place to do it (pick one):

    1. with a javascript function
    2. in the vertex shader
    3. in the fragment shader
    4. in the html file
    5. it can't be done.
  3. (2) Why does OpenGL have the triangle-strip object type, in addition to the triangle type?

    1. It leads to smaller, faster, graphics objects.
    2. It leads to bigger, faster, graphics objects.
    3. It's not possible to split some complicated polygons into lots of simple triangles, but you can split them into triangle-strips.
    4. The standards writers were being paid by the word.
  4. (2) Standards (select all that are true)

    1. allow programmers to move between projects
    2. allow different types of hardward to be substituted in.
    3. ..... operating systems ......
    4. allow vendors to lock in customers.
    5. can prevent the latest HW from being used to its fullest.
  5. (2) What is the physical principle underlying LCD?

    1. Fire an energetic electron at a rare earth atom and a photon of light is emitted.
    2. A solution of corkscrew shaped molecules can rotate polarized light.
    3. Putting your finger close to a capacitor can change its capacitance.
    4. If two coils of wire are close, then an alternating current in one can induce a current in the other.
  6. (2) What is the physical principle underlying the CRT?

    1. Fire an energetic electron at a rare earth atom and a photon of light is emitted.
    2. A solution of corkscrew shaped molecules can rotate polarized light.
    3. Putting your finger close to a capacitor can change its capacitance.
    4. If two coils of wire are close, then an alternating current in one can induce a current in the other.
  7. (2) Which of Philo T Farnsworth's chores as a kid gave him an idea for electronic television?

  8. (2) Color printing on a sheet of paper exemplifies

    1. additive color
    2. subtractive color
    3. multiplicative color
    4. divisive color
    5. exponential color
  9. (4) Major components of the OpenGl model as discussed in class are:

    1. Objects, viewer, light sources, planets, material attributes.
    2. Still cameras, video cameras, objects, light sources.
    3. Objects, viewer, light sources, material attributes.
    4. Colored objects, black and white objects, white lights, colored lights
    5. Flat objects, curved objects, near lights, distant lights.
  10. (2) How do you draw a pentagon in WebGL?

    1. Split it into triangles.
    2. Split it into triangles if it is concave, otherwise draw it directly.
    3. Split it into triangles if it is convex, otherwise draw it directly.
    4. Draw it directly.
    5. Split it into hexagons.
  11. (2) If you want your javascript program to send a color for each vertex to the vertex shader, what type of variable would the color be?

    1. uniform
    2. varying
    3. attribute
    4. dynamic
    5. static
  12. (2) The carpet is an example of

    1. diffuse reflection
    2. specular reflection
    3. environment mapping
    4. bump mapping
    5. how RPI saves money
  13. (2) In the OpenGL pipeline, the Primitive Assembler does what?

    1. fits together pieces of ancient Sumerian pottery.
    2. rotates vertices as their coordinate systems change.
    3. creates lines and polygons from vertices.
    4. finds the pixels for each polygon.
    5. reports whether the keyboard and mouse are plugged in correctly.
  14. (2) If you do not tell WebGL to do hidden surface removal, and two objects overlap the same pixel, then what color is that pixel?

    1. WebGL throws an error.
    2. the closer object
    3. the farther object
    4. the first object to be drawn there
    5. the last object to be drawn there
  15. (2) gasket2 has this code: var points=[ ]; ... points.push(a,b,c); What does push do here?

    1. Appends new entries to the end of points.
    2. Inserts new entries at the start of points.
    3. Overwrites the first entries of points.
    4. Overwrites the last entries of points.
    5. Throws an error because we didn't specify a size for points.
  16. (2) Look at this CIE chromaticity diagram. If you wanted to make white by mixing one spectrally pure color with the pure color with wavelength 600 nm, what wavelength would that other color be?

    1. 400
    2. 485
    3. 535
    4. 580
    5. It's not possible, because purple is not a spectrally pure color.
  17. (2) Sometimes you want to send a variable to a vertex shader that has the same value for every vertex. Pick the following item for which this would be useful.

    1. the vertex's coordinates
    2. the vertex's color
    3. the object's global orientation
    4. the location of the global light source
  18. (2) You call gl.BufferSubData to do what?

    1. to add or replace part of the buffer in the GPU.
    2. to define a submarine object.
    3. to subtract some data in the buffer.
    4. to tell the GPU to look for a pattern and substitute any occurrences,
    5. to tell the GPU to use a subroutine instead of the main program.

(Total: 38 points.)