CG Class 14, Mon 2018-10-15

1   Midterm exam

  1. aka Class 13.
  2. The exam and answers are now online. Sorry I didn't get them online before Thurs.
  3. Lingyu writes: Highest score: 40/40.
    Lowest score: 20. Average score: 32. Median score: 33.

2   Quaternions

  1. Finish off 3D rotations with quaternions.
  2. It's easy to find the quaternion rotation for a given axis and angle.
  3. and vice versa.
  4. Combining two rotations and finding the axis and angle of the equivalent single rotation is easy.

3   3D interpolation

  1. My note on 3D Interpolation, which is better than the textbook section on animating with Euler angles.
  2. The problem with stepping the 3 Euler angles together is that the combo rotation might not be smooth.

4   Shadertoy

Shadertoy.com is a very nice use of WebGL. The co-creator of the website has an account named "iq", searching for that account brings up some renders that really push Webgl to its limits in really pretty ways (he used to work for Pixar and Siggraph) - Seretsi Khabane Lekena '17.

You need a machine with reasonable graphics to show these. The TP Yoga that I bring to class is not one of them.

5   Upcoming schedule

There will be normal lectures for the next two Weds.

6   Textbook Slides

Here are links to the next few textbook powerpoint slides. We do the chapter 5 slides really quickly.

  1. 5_4 WebGL transformations

  2. 5_5 Applying transfomations

  3. WebGL Transformations Angel_UNM_14_5_4.ppt 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.
  4. 6_1 Building Models.

    Big idea: separate the geometry from the topology.

  5. The Rotating Square.

    Big idea: render by elements.

  6. 6_3 Classical Viewing.

    Big ideas: parallel (orthographic) and perspective projections. The fine distinctions between subclasses of projections are IMO obsolete.

7   Angel programs - Chapter 5

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.

8   Homework 5

is now online, due next Mon.