CSCI 360

Fall 2018, Test 1


  1. Representation
    1. [6 points] What is the difference between raster and vector graphics? Describe how a scene would be represented in each.
  2. Frame Buffer
    1. [4 points] What problem does double buffering overcome and how does it overcome this problem?
    2. [4 points] What is Rasterization?
  3. HSL Colors
    1. [4 points] What is the HSL color space? What quantities are used to represent colors?
    2. [4 points] Assume you have the function Interp(a,b,s). This function interpolates a value s% of the way between a and value b. How could you find six colors evenly spread between red and blue using this function in HSL space? Provide pseudo-code.
  4. Shaders
    1. [2 points] Name the two shaders available in webGL.
    2. [4 points] Describe the types of input to each shader.
    3. [2 points] Describe the different components that supply input to each shader.
    4. [2 points] What sort of tasks should be performed in each shader?
  5. [8 points] Image Transformation: Draw a diagram representing the transformation process in moving from modeling coordinates to an image on a device.
    1. Label each coordinate system
      • Clipping Space
      • Device Coordinates.
      • Modeling Coordinates
      • Normalized Device Coordinates
    2. Show where each transformation occurs
      • Projection from 3D to 2D
      • Rasterization
    3. Label where the WebGL shaders are invoked.

    Over Please
  6. [6 points] A vertex buffer object has three main operations. Describe what happens at each.
    1. glGenBuffer
    2. glBindBuffer
    3. glBufferData
      varv vBuffer = gl.createBuffer();
      gl.bindBuffer(gl.ARRAY_BUFFER, vBuffer);
      gl.bufferData(gl.ARRAY_BUFFER,flatten(vertex),gl.STATIC_DRAW);
      
  7. [4 points] Describe what the following code sequence achieves
    gl.bindBuffer(gl.ARRAY_BUFFER, this.vBC);
    gl.bufferData(gl.ARRAY_BUFFER,flatten(this.bc),gl.DYNAMIC_DRAW);