CG Class 15, Wed 2018-10-17
Table of contents
1 Angel programs - Chapter 5 ctd
- hata shows:
- Using a modelview matrix set by lookat and a projection matrix set by ortho
- Drawing a mesh with line strips.
- hat shows:
- Drawing the same points both as a triangle fan and as a line loop.
- Setting options to make the lines slightly in front of the triangles.
- Doc for depthfunc.
- Doc for polygonoffset.
- ortho1 and ortho2 show clipping with an interactive orthographic (parallel) projection.
- perspective1 and 2 show an interactive perspective projection.
- shadow shows a shadow.
- Notes about the computer programs:
- The point is not to teach javascript; it's just the vehicle. Before javascript, I taught C++. Javascript is easier.
- One point is to teach a widely used API, i.e., WebGL.
- Another point is to teach graphics concepts like projection and viewing, and their APIs, like lookAt.
- These concepts will exist in any graphics API.
3 Term project proposals
- See the syllabus.
- I moved the due dates back.
- The proposal will be homework 6.
- Submit on LMS.
4 Research paper for ECSE-6964
- 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.
- 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
- I didn't show WebGL Transformations Angel_UNM_14_5_4.ppt in detail since it is mostly obsolete.
- The old OpenGL modelview and projection matrix idea is now deprecated, but is interesting for its subdivision of transformations into two functions.
- 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).
- 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
-
6_5 Computer Viewing: Projection.
Big idea: view normalization. We'll see this more in chapter 7.
8 Chapter 7 slides
-
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.
-
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.