Simple Home Page for Fall 2005 session taught by Prof. S. Chaiken
All Broken Links (lecture notes and turnin) are currently under construction.
What's New and Still Relevant
Handouts including Syllabus, Instructions and Assignments
Lectures
- Lecture 01 (8/29)(.pdf)
Reading:HB ch. 1 and 2, and details from 2, 3, and 4 needed for Project 1
Themes:
- Lecture 02 (8/31)
Reading:
Themes:
- We re-explained with more detail what is event-driven programming.
See the end of Lecture 01 (8/29)(.pdf)
for notes.
- We introduced "Computer Graphics" (as opposed to graphics using other techologies, such
as cave drawing, calligraphy with brushes or pens, oil painting, photography, etc)
as the combination of some mathematics and the comtemporary graphics technology of rastor
scan displays.
- We discussed slowly and carefully the significance of functions in
formulas like y=Mx+B and F(x,y)=0
- See Lecture 03 (9/02)(.pdf)
for notes.
- Lecture 03 (9/2)(.pdf)
Reading:
Themes:
- Basic mathematics for graphics, including how to use signed numbers to
compare geometic positions and the significance of F(x,y) greater than 0, equal to
0 and less than 0 when F(x,y)=Mx+B.
- Basic rastor scan technology: Frame buffer and rastorized display
- Terminology, with meanings of units: refresh rate, persistance, resolution,
dot pitch, aspect ratio, depth (number of bit planes), bitmap, pixmap
- Digressions and class questions:
- Well-formed propositions like 1+1=3 and the truth of a proposition
are different concepts; how this is related to lines and other curves
given by "equations".
- Analog radar display technology with circular (i.e., polar) scan
and high persistance phosphors.
- Lecture 04 (9/7)(.pdf)
Reading:
Themes:
- Instructions for project turnin. turnin-csi422 is a suid program.
- Sample calculation problems; speed of light is 1 foot per nanosecond!
- Drawing a line segment: Clipping window to screen viewport transformation
- Drawing a line segment: Line Rastorization and Bresenham's Algorithm.
- Lecture 05 (9/9)(.pdf)
Homework 1 Assigned..Due 9/16
Themes:
- Details of Bresenham's Algorithm.
- Lazy (smart!) way to derive values to add to pk by
using the linearity of line equation function F(x,y) to analyze
how it changes when x is increased and when y is increased.
- Lecture 06 (9/12)(.pdf)
Themes:
- Kinds of Coordinates and some OpenGL Tips.
- Walkthrough of RedBook's double.c program, emphasizing
the transformations and the matrix stack.
- OpenGL API style is a command driven state machine.
- Mouse focus
- Lecture 07 (9/14)(.pdf)
Themes:
- Matrix Multiplication glimpse.
- Parametric represenations of circles and other curves.
- Vectors: array; points or displacements; addition; point plus displacement
and displacement plus displacement
Points and displacements help to construct a model.
- Scalar multiplication; uniform scaling transformation
and displacement stretch.
- Parametric Representation of Lines.
Lecture 08 (9/16)(.pdf)
Themes:
- Surprise Quiz! (demonstrate Bresenham's algorithm).
- Vector addition, and scalar multiplication; parametric line representation
used to find the intersection of a line and a plane.
- Visualizing the scaling transformation applied to a 2-dim figure.
- Multiplying a matrix (on the right) with a vector is a transfromation
that transforms unit vectors into matrix columns.
- Scaling expressed with a matrix.
Lecture 09 (9/19)(.pdf)
Preliminary Project 2 Assignment, Homework 2
(Due 9/26), and Midterm 1 reminder
Themes:
- What is a linear transformation?
- Geometric significance, matrix and algebra forms
- How a linear transformation is determined by its action on
the coordinate unit vectors. Building transformation matrices using
this fact.
- Non-uniform scaling and shearing examples.
- Why rotation around the origin is linear.
- Deriving the 2-d rotation matrix (with sin and cos).
- Translation is NOT linear.
- Combine translation, rotation and the translation inverse to
rotate around a point NOT the origin.
Lecture 10 (9/21)(.pdf)
Project 2 Assignment due (9/28), Midterm 1 syllabus
Themes:
- Determining linear transformation matrices from how unit
vectors are transformed.
- 2-d rotation
- Direction Cosines in 2-d and 3-d space; they can determine
a 3-d rotation; how to put them into the matrix
- Matrices in C/C++; static initialization; multiplication
- Translation transformation, non-linearity
- Homogeneous coordinates as a trick for translation.
- Rotation combined with translation; combined matrix,
comparing two orders of combination.
- Matrix multiplication represents composition of transformations
- (Mentioned dot products and projections.)
Lecture 11 (9/23)(.pdf)
Project 2 Assignment due (9/28), Midterm 1 syllabus
Themes:
- What composition of transformations means; how it is one transformation
- How project 2 is for exploring compositions.
- Examples of one matrix for a composition calculated by the matrices
for the composed transformations MULTIPLIED
- Storage and computation savings...
- Inverses of transformations and of matrices, identity matrix.
- Rotation around a "hot-spot" (Conjugate transformations.)
- Transformations used to change coordinate systems. The inverse
of a global-to-local axis transformation will give local axis coodinates
when applied to global coordinates.
- Significance of the transformation used for OpenGL viewing.
- Glimpse at dot product(please study/review).
Lecture 12 (9/26)(.pdf)
Notes/answers for HW1-2 questions/problems
Themes:
- Two concepts of what transformations do---change objects and change coordinates
- Intro. OpenGL standard camera and viewing transformation idea.
- Dot product, Pythagorian Theorem extended to 3-d, vector length
- Dot product and the cosine of the angle between vectors.
- Mutual orthogonality of unit coordinate vectors, normality too.
- Why the inverse of a rotation matrix is its transpose;
also in 3 dimensions since rotation matrix has columns of direction cosines
of rotated unit coodinate vectors.
- Some 3-d complications and difficulties, like rotations do not commute
- Problem to tie it together: Reflect around an oblique line not through
the origin. (Conjugation idea, translation, rotation, calculating a new unit
vector and one perpendicular to it, reflection.)
Lecture 13 (9/28) Midterm 1 Exam.
UNDER CONSTRUCTION Lecture 14 (9/30)(.pdf)
HW3 (includes redo program of the 2-d viewing exam question) due 10/10
Ideas tested by Midterm 1, which indicate
what we expect students in a University computer graphics course to learn.
Themes:
- Two distinct lines that meet at one point determine a plane,
two parallel lines also determine a plane, two lines might be skew (not meet and are
not parallel).
- Angles in space--sign depend on direction from which we look at the angle.
What positive angles mean, right hand rule, matrices for rotations around
x, y and z axes.
- Discussion of dot product, application of it to finding length of
a vector's projection on another vector.
- Projection of (a,b,c) on xy-plane (where z=0) is (a,b).
- Vector cross product: action on i, j, k (unit coordinate vectors),
formula derivable from rules about action on i, j, k, and formulas
given by determinant and directly.
- Cross product: geometric significance and application to find
a third orthogonal unit vector from two given ones.
- Goal for return lecture: How to rotate space by a given angle around
a given line. The hard, new thing is to do it around a line through the
origin.
Lecture 15 (10/7) (.pdf) Project 3 Assignment
is on the LAST SLIDE (due date TBA).
Themes:
- Stateful style of OpenGL Application Programming Interface.
- 3 OpenGL matrices and matrix stacks. Each matrix stack is separate from the corresponding
matrix.
- Viewing pipeline in general
- Idea and application of modeling and viewing transformations.
- OpenGL modelview matrix and how to use it for viewing, modeling or both.
- Restrictions and rules for manipulating each OpenGL matrix.
- Using OpenGL transformation functions for (1) modeling and (2) viewing.
Lecture 16 (10/10) (.pdf)
Themes:
- 3-d rotation around an arbitrary axis solved by combining 5 subproblem solutions.
- What are the givens and what is the goal for this problem?
- Breaking one subproblem into two sub-subproblems.
- Posing mathematically the problem of rotating an arbitrary unit vector into a specified coordinate
plane by looking at the shadow of it in one plane.
- It is easier to design the inverse of some desired rotations.
Use the fact that the inverse of a rotation matrix is its transposing.
- Computational efficiency: pre-multiply transformation matrices; avoid repeated calculation
of repeated numerical factors.
- Alternative methods: (2) Eliminate a special case and then use cross products to
calculate the unit vectors for a new coordinate system. (3, 4 future) Algebraic method and
quaternions.
Lecture 17 (10/12) (.pdf)
Themes:
- Usefullness of conjugate ((Tinv)R(T)) transformation combination
- See corrected and improved slides; method 2 constructs space rotation around a
given axis by calcalution of cross products to construct new orthogonal coordinate vectors.
- Continue with understanding and using OpenGL ModelView transformation, applied
to the RedBook Ch. 3 robot and planet example programs. Use of the MV matrix stack and
of model-drawing functions.
- Three conceptualizations of what the ModelView matrix does:
- Install a viewing transformation.
- Install a modeling transformation that transforms a generic or template model
into an instance with specified scale, location and rotation.
- Install a coordinate transformation that changes the significance of world coordinates
so the new coordinates refer to positions and orientations which the OpenGL programmer
had designed.
- Introduction to sdc's annotated robot.c display function.
Lecture 18 (10/14) Prof. Samual Lomonoco's lecture on Quantum Computing at the
Conformal Computing 2005 Conference
Lecture 19 (10/17) (.pdf)
Themes:
- Details of robot.c demo in terms of local coordinate systems.
- Additional transformations multiplied into the OpenGL current ModelView transformation
are specified in terms of the current local coordinate system. Each added transformation
then changes the current local coordinate system.
- When a hierarchical model is drawn, the matrix stack is very
useful for holding previous transformations whenever a new transformation is
applied temporarilly.
- Introduction to techniques for 3-d realism in preparation for 3-d viewing and projection.
Lecture 20 (10/19) (.pdf)
Themes:
- Techniques for 3-d realism
- What's a view camera?
- Viewing Transformation and Projection Transformation.
- Significance of normalized projected z coordinate for hidden line/surface removal
- Inputs to and calculation of the viewing transformation.
- Viewing transformation setting in OpenGL.
- How to do parallel projection: Ignore z coordinate; using OpenGL functions.
Lecture 21 (10/21) (.pdf)
Themes:
- Viewing and then Projection tranformations
- Projection consists of a linear transformation followed by
perspective division; the pipeline divides by the 4th component of
homogeneous coordinates.
- Similar Triangles are used to derive a simple case of perspective projection.
- (Analyze knowns and unknowns to formulate and solve the problem.
- Light Show Demo: See shadow of a cubic crate cast by a point light source.
Lecture 22 (10/24) Midterm 2
Lecture 23 (10/26) (.pdf created after the lecture)
- Homework DUE NEXT CLASS: 1hr of quickstart or further learning of Blender; use
LC-3 or 4 computers if necessary, and write a 1/2 page report.
Themes:
- Some facts about perspective: Foreshortening, originally parallel lines project
either to parallels or lines that meet. Two point perspective.
- Mathematically, parallel projection is the special case of perspective with the
projection point ("eye") at infinity.
- Roadmap for new topics: lines, planes and projective geometry, hierarchical models,
some clipping, lighting and shading
- Accuracy vs speed/cost tradeoffs differ for entertainment/commercial graphics and
visualization graphics.
- Higher level models, relationships between them and OpenGL, immediate vs. retained
mode graphics, display lists
Lecture 24 (10/28) (.pdf UNDER CONST.)
Themes:
- Specifying Near and Far clipping planes by equations like z=1, role and operation
of the depth buffer
in hidden object elimination, enabling the depth buffer and clearing the depth buffer
and color buffer together, corrected details of OpenGL's glOrtho()'s
function and the interpretation of normalized device coordinates.
- Perspective projection, straight lines of projection through the eye.
Introduction to points at infinity. Parallel projection too.
- Classical categorization of parallel and perspective projections:
vanishing points and their use in freehand perspecrtive sketching.
- Formulation of perspective projection onto the xy-plane
with an eye with variable coordinates.
- What homogeneous coordinates really mean: ordinary coordinates corresponding
to homogeneous coordinates with w=0, many homogeneous coordinates represent one
3d point, equivalence relation defined on homogeneous coordinates.
- Theorem that linear combinations (with coefficients that don't necessarilly
add up to 1) of homogeneous coordinates of two ordinary points correspond to
INTERPOLATIONS of the ordinary coordinates. An interpolation of
ordinary coordinates gives the coordinates of a point on the line.
(Omitted detail..what I said requires that alpha1.w1+alpha2.w2 not equal 0.)
Lecture 25 (10/31)
Themes:
- Viewing and Projection.
- z-buffer.
- Perspective division.
- Homgeneous Coordinates.
- Projection as matrix multiplication followed by
Perspective division
- OpenGL and glu functions for setting the projection:
glOrtho2d, glPerspective, gluFrustum
- Limit (infinity) as object point moves into the plane that contains the
eye and is parallel to the projection plane.
Lecture 26 (11/02)
Handout of slide copies on homogeneous coordinates, projective geometry, and
mathematics of projection.
Themes:
- Homogeneous Coordinates, points at infinity.
- Linear combinations and lines, linear transformations preserve lines.
- Equations for planes; homogeneous coordinates for planes, the plane at infinity
- Solving the perspective (and parallel too) projection problem by
the parametrized expression for projection lines and solving for the parameter.
equation Viewing and Projection.
Lecture 27 (11/07)
Finished handout of slide copies on homogeneous coordinates, projective geometry, and
mathematics of projection.
Themes:
- Perspective projection, degeneracies discussed therein
- Linear Algebra: Dependencies, Linear Independance, Greedy Algorithm, Bases,
Linear Transformations and how they are determined by their action on just the vectors
in a basis.
- Linear combinations and lines, linear transformations preserve lines.
- 4-tuples used differently as (1) plane equation coefficients and (2) point homogeneous
coordinates. ("Bra-Ket=Bracket" notation from physics.)
- Uses of plane equations in graphics, e.g., projection, clipping/sectioning, normal vectors.
- Demonstration of elementary lighting/shading features in Blender
Lecture 28 (11/09)
Themes:
- Winding Number--defined and illustrated on the blackboard.
- Basic Functionality of the GL layer compared to higher level functions
of GLU and GLUT. GL processes only simple, closed, convex polygons. The tessellator
of GLU is used for non-simple, non-convex contours.
- GL processes vector objects like polygons and transformations specfied in terms of
coordinates; it generates fragments and further processes them. Many fragments contribute to
the final RGB value belonging to one pixel.
- Different conditions on winding number specify different regions to be filled.
Some alternatives available from the GLU Tessellator illustrated
(figure from Ch. 11 of Redbook)
- Some categories of graphics creation software:
- 2D vector (Adobe Illustrator, PrintShop, XFIG
illustrated)
- 3D modeling, animation and rendering (Maya, 3DXMax, Blender)
- 2D image editing/processing (Adobe Photoshop, typical digital camera software, GIMP)
- A glimpse at antialiasing done by GIMP
- Explanation of Lambertian (i.e., diffuse) reflection
- Glimpse at basic lighting and shading combinations: Ambiant lighting with
diffuse reflection, Directional lighting lighting with diffuse reflection, and
specular reflection (with directional lighting only).
Lecture 29 (11/11)
Midterm 2 OpenGL programming catchup project..Due Nov. 21
Themes:
- Mesh Data Structures
- Required OpenGL Polygon properties: Planar, Simple and Convex (defined and illustrated)
- GLU support for tessellation and curves.
- Issue of which side is the front side:
- Color inside and outside differently.
- Back-face culling for closed surfaces (as long as clipping does not reveal the inside.
- Distinguishing the inside-facing and outside-facing sides of a face by the
order of its vertices in the list.
- Uses of planes, their equations, and equation coefficients.
- Normal vector:
- Attached to vertices in OpenGL; must have unit length.
- Transforms differently from vertex coordinate vectors.
- Calculation using cross-product; geometric interpretation of cross product
- Calculation using subdeterminants in the 4x4 matrix of homogeneous coordinates
of 3 constant plus 1 variable points.
- Calculation of approximation by projected areas on coordinate planes.
- Simple 3D coloring of polygons: Flat (constant) color; Smooth (interpolated, Gourand) color.
- Blender previewing is not complete...do RENDER operation when you experiment
- OpenGL Programmer must specify and enable many things to get rendering with
a Lighting and Materials model...details in the slide.
Lecture 30 (11/14)
Themes:
- Different Rendering Methods for lighting/materials models, with
different quality and speed: Constant, Gourand, Phong
Mesh Data Structures
Illumination/Lighting Model; Surface Rendering contrasted
Factors in various models: Material, Light, Viewing, Geometric Relationships
Lambert or diffuse reflection combines with either ambient or directional light.
Physics of extensive versus intensive quantities; light intensity is Light Power Per Unit Area,
which determines the brightness of each rendered spot.
.....MORE UNDER CONSTRUCTION....
Lecture 31 (11/16)
Themes:
- Intensive vs extensive physical quantities.
- Kinds of reflection.
- Summation of contributions from separate light sources and models.
- Angles in the geometry of reflection; Phong and approximate Phong specular
reflection.
- Emissive light.
- Distance and angle attenuation effects; Warn model.
- Color calculations, 3D color values; separate colors for
different effects (diffuse vs specular reflection); alternative
color coordinate systems: subtractive, HSV, YIQ (NTSC).
- Color coordinate transformations.
- Perceptual quantities vs. physical quantities.
- Perception of human sensory response is generally logarithmic with
intensity.
Lecture 32 (11/18)
Themes:
- Parametric representation applied to generating of a donut (torus) mesh.
- Calculation of surface normal
- Tangent vectors to a surface given parametrically; their cross product
is in the normal direction; local orthogonal coordinate system can be constructed.
Lecture 33 (11/21)
Themes:
- Line Clipping and Filled Polygon Clipping problems and algorithms.
- Rastorization of Filled Polygons.
- Fragments versus pixels.
- Convexity: Properties and benefits.
- Example of a bad result when inputs are not convex.
- Halfspaces; Express convex polygons as intersections thereof; Define clipping regions.
- Sutherland-Hodgman algorithm and its Pipelineable nature.
Lecture 34 (11/28)
Themes: (Curved Models)
- Images
- Surfaces defined by (1) Equations and (2) Functions of parameters.
- Tangent vectors to parametrized defined surface are
calculated with partial derivatives.
- Approx. by meshes.
- Brief mention of Blobby Objects, gaussians, meta-balls, sweep representations, fractals,
shape grammars, particle systems and other physical models
- Interpolation; Approximation
- Why use polynomials?
- Spline surfaces and interpolated animations in Blender
- nth degree polynomial determined by n+1 values.
- Lagrange interpolation; why it is bad.
- Piecewise polynomial functions.
Lecture 35 (11/30)
Themes: (Curved Models continued)
- nth degree polynomial determined by n+1 values.
- Lagrange interpolation; why it is bad.
- Piecewise polynomial functions.
- Parametric continuity conditions (zeroth order, first order, etc.)
- The practice of specifying splines with control points; sharing control points
among sections guarantees various continuity conditions.
- Natural cubic spline.
- Hermite spline.
- Writing a section's function as a sum of control point coordinates weighted by
blending functions.
- How properties of Hermite blending functions guarantee geometric conditions on the
spline.
- Catmull-Rom or Overhauser or cardinal splines depend on control points (and tension)
only; each section can be written as a sum weighted by blending functions.
- Bezier: Binomial theorem and its role in guaranteeing that each section is
inside the convex hull of its control points.
- Position and derivative properties of a Bezier section at its endpoints.
- Use in lossy compression of basis expansions of functions (discrete cosine transform).
Lecture 36 (12/2)
Themes:
- How Control points for Bezier interpolation work in Blender IPO curves.
- The difference method to quickly evaluate polynomial functions on integer
(or other arithmetic progression) values. (See HB 8-17, Forward-Difference Calculations)
- Handout: Ch. 5 of Barnsley's book with informational programming projects included.
- Fractal Models: Self-similarity, transformations applied to images), Snowflake curve.
- Custom-made 2D fractals using Barnsley's method of affine transformations.
Lecture 37 (12/5)
Themes:
- Data Structures and software organization needed for doing Retained Mode graphics under
OpenGL, which is immediate mode and stateful.
- Object oriented scene graph data structure.
- Walk-thru of class diagram in ReadMe and selected robot modelling code in Example.cc
Lecture 38 (12/7)
Themes:
- Portion of scene graph completed on paper handout.(please study!)
- Object Oriented ideas:
- One class derived from a base class, derived class
objects include data and methods from the base class; how this is coded in C++
- Function polymorphism using function name overloading: One function name,
multiple combinations of types of arguments, different function bodies for each
combination of types of arguments.
- Walk-through of selected portions of scene graph software completed: GLViewer.cc,
Cube.h, Cube.cc, Geometry.h, Node.h, Node.cc
- The Render() method of a graphics primative like Cube draws the object, like
a cube.
- How the viewer installs a the display callback, how the display callback invokes
Render() on a root.
- Left-child + right-sibling data structure to implement trees where each node
has an arbitrary number of children, in a particular order. Tree parenthood diagram
transformed to Left-child + right-sibling pointer diagram. Sibling list walk is needed
to add a new last child to a node.
- Concluded with explanation of a virtual function. The function body of render()
in the Node, the lowest base class, is empty. Different classes of scene graph objects have
their own, different render() methods.
Lecture 39 (12/9)
Themes:
- Render() in the Scene Graph classes is a virtual function in class Node.
All the derived classes of Node will have their own versions of Render()
- Pre-order traversal of the Scene Graph tree...walkthrough of the Traverse()
function member of Node.
- Pushing and popping of the OpenGL viewmodel matrix when KeepMatrix==False
- Analysis of recursive calls on the left-child and right-sibling of one node; how this
results in all siblings being Traversed in order.
- Significance of pre-order processing: Render() is the first operation done on a node
when it is traversed (after possibly saving the viewmodel matrix.)
- Intro. XML via X3D example (Resources)
- Two kinds of XML Tag: (1) Self-contained (2) Separate beginning and end, where
zero or more tags can be written between the beginning and end.
- The self-contained tag or the beginning must have the tag type
- The tag type may be followed by a sequence of attributes: name and value
pairs like name=value
- The tags form a tree-structure...The tree structure in my example from Blender
is similar to that of Angel's Scene Graph
Navigation:
Lab, Office Hour and Lecture Times
Link to latest lecture postings
Telnet access link
to the U. Albany Unix cluster
U. Albany ITS Help Desk,
or visit LC-27.
What Was New:
-
nothing, everyting is new right now