CG Class 15, Wed 2018-10-17

1   Angel programs - Chapter 5 ctd

Chapter 5

  1. hata shows:
    1. Using a modelview matrix set by lookat and a projection matrix set by ortho
    2. Drawing a mesh with line strips.
  2. hat shows:
    1. Drawing the same points both as a triangle fan and as a line loop.
    2. Setting options to make the lines slightly in front of the triangles.
    3. Doc for depthfunc.
    4. Doc for polygonoffset.
  3. ortho1 and ortho2 show clipping with an interactive orthographic (parallel) projection.
  4. perspective1 and 2 show an interactive perspective projection.
  5. shadow shows a shadow.
  6. Notes about the computer programs:
    1. The point is not to teach javascript; it's just the vehicle. Before javascript, I taught C++. Javascript is easier.
    2. One point is to teach a widely used API, i.e., WebGL.
    3. Another point is to teach graphics concepts like projection and viewing, and their APIs, like lookAt.
    4. These concepts will exist in any graphics API.

3   Term project proposals

  1. See the syllabus.
  2. I moved the due dates back.
  3. The proposal will be homework 6.
  4. Submit on LMS.

4   Research paper for ECSE-6964

  1. If you are registered for the grad version of this class, then in addition to the term project, you must also write a research paper; see the syllabus.
  2. Simultaneously with the term project progress reports, please submit research paper progress reports.

5   IOCCC programs

local copy of some of them.

Fun examples of what you can do in a few lines of code.

6   Comments on recent powerpoint slides

  1. I didn't show WebGL Transformations Angel_UNM_14_5_4.ppt in detail since it is mostly obsolete.
    1. The old OpenGL modelview and projection matrix idea is now deprecated, but is interesting for its subdivision of transformations into two functions.
    2. The modelview matrix moves the world so that the camera is where you want it, relative to the objects. Unless you did a scale, the transformation is rigid - it preserves distances (and therefore also angles).
    3. The projection matrix view-normalizes the world to effect your desired projection and clipping. For a perspective projection, it does not preserve distances or angles, but does preserve straight lines.

7   More Chapter 6 slides

  1. 6_4 Computer Viewing: Positioning the Camera.

  2. 6_5 Computer Viewing: Projection.

    Big idea: view normalization. We'll see this more in chapter 7.

8   Chapter 7 slides

  1. 7_1 Orthogonal projection matrices.

    Big idea: Given any orthogonal projection and clip volume, we transform the object so that we can view the new object with projection (x,y,z) -> (x,y,0) and clip volume (-1,-1,-1) to (1,1,1) and get the same image. That's a normalization transformation'. See slide 14.

  2. 7_2 Perspective projection matrices and the normalization transformation.

    Big idea: We can do the same with perspective projections. The objects are distorted like in a fun house. See slide 8.