Skip to main content

CG Class 14, Mon 2019-10-07

1   Iclicker questions

  1. About the next few questions:

    1. The next few questions will work with 3D points like \(p=\begin{pmatrix}1\\2\\3\end{pmatrix}\).
    2. I'll also use matrices like \(M=\begin{pmatrix}2&0&0\\0&2&0\\0&0&2\end{pmatrix}\).
    3. We can transform points thus: \(q=Mp\). This gives \(q=\begin{pmatrix}2\\4\\6\end{pmatrix}\).
    4. Common types of transformations are rotation, translation, scaling, and perspective or projection.
    5. I haven't yet discussed the following topics. This is to see what you already know. I'll let you correct your answers.

    The above matrix is what type of transformation:

    1. identity
    2. perspective
    3. rotation
    4. scaling
    5. translation
  2. \(M=\begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix}\) is what type of transformation?

    1. identity
    2. perspective
    3. rotation
    4. scaling
    5. translation
  3. \(M=\begin{pmatrix}.6&.8&0\\-.8&.6&0\\0&0&1\end{pmatrix}\) is what type of transformation?

    1. identity
    2. perspective
    3. rotation
    4. scaling
    5. translation

2   Midterm exam

  1. In 10 days, Thurs Oct 17, in class.

  2. You may bring in one 2-sided 8.5"x11" paper with notes. You may not share the material with each other during the exam. No collaboration or communication (except with the staff) is allowed.

    (The exam can't be open book because some student share books and others use an online text.)

  3. Last year's midterm exam.

  4. Its solution.

  5. The exam may contain some recycled homework questions.

  6. Here are several older exams, with some solutions. This year's topics will be slightly different, but will be largely the same. OTOH, since there are a finite number of electrons in the universe and they say that recycling is good, I'll recycle many of these questions.

    1. Midterm F2017.
    2. Midterm F2017 solution.
    3. Midterm F2016.
    4. Midterm F2014, Midterm F2014 Solution
    5. Midterm F2013, Midterm F2013 Solution
    6. Midterm F2012, Midterm F2012 Solution

If you prepared answers to all the questions on all the old tests, then you'd do well this semester, except for the new stuff. However, you would also deserve to do well since you'd know the material.

  1. Part of this Thurs will be a review of previous lectures and exams.
  2. I'll discuss other answers in the review, or you may figure out answers on your own.

3   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.

4   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.

5   Section 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.

6   Section 7 slides ctd

  1. 7_3 Meshes.

    Big ideas:

    1. Meshes are common for representing complicated shapes.
    2. We can plot a 2 1/2 D mesh back to front w/o needing a depth buffer.
    3. Unstructured point clouds with millions of points from laser scanners are common. We can turn them into a mesh by using various heuristics about the expected object.
    4. Drawing the mesh edges a little closer than the faces is a hack that probably works most of the time if the scene isn't too complex. I.e., go ahead and use it, but don't be surprised.
  2. 7_4 Shadows.

    Big idea:

    1. If there is one light source, we can compute visibility with it as the viewer.
    2. Somehow mark the visible (i.e., lit) and hidden (i.e., shadowed) portions of the objects.
    3. Then recompute visibility from the real viewer and shade the visible objects depending on whether they are lit or shadowed.
    4. This works for a small number of lights.
    5. This capability is in OpenGL but not in WebGL, so this topic is enrichment only (= will not be examined).
  3. 7_5 Lighting and shading I.

Big big topic.

7   RPI's long history in Computer Graphics

  1. Curtis Priem.
  2. Mike Wozny, Head of ECSE, was one of the founders of IEEE Computer Graphics and Applications, which printed that article by Maureen Stone.
  3. William Lorensen, co-inventor of marching cubes, earned his BS and MS here at RPI.