CG Class 15, Tues 2017-10-10
Table of contents
2 Prof Radke talk on Nov 6
On Monday 2017-11-6, Prof Rich Radke will speak to the class while I am at ACM SIGSPATIAL .
He has written Computer Vision for Visual Effects.
3 Textbook Slides
We'll continue with the textbook powerpoint slides.
The big topic for Chapter 5 is homogeneous coordinates. They allow all the common transformations - translation, rotation, scaling, projection - to be expressed as a multiplication by a 4x4 matrix.
We doo the chapter 5 slides really quickly.
-
WebGL Transformations Angel_UNM_14_5_4.ppt 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.
-
Big idea: separate the geometry from the topology.
-
Big idea: render by elements.
-
Big ideas: parallel (orthographic) and perspective projections. The fine distinctions between subclasses of projections are IMO obsolete.
4 Angel programs - Chapter 5
- 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.