W Randolph Franklin home page Login


Jump to today.


Search all ComputerGraphicsFall2010 pages:


Printer friendlier format of this page

1.  Interested in taking ECSE-4750 Computer Graphics?

ECSE-4750 Computer Graphics Fall 2010 will be 80% the same as in Computer Graphics Fall 2009. I am glad to talk to anyone thinking about taking this course. Don't worry about SIS showing the course as full. Also don't worry about the COCO prereq. That is merely a proxy for sufficient computer background. Get an ADD form, fill it out, pin it by my door, I'll sign it, then you pick it up, and turn it in.

As of 9/28/10, according to http://sis.rpi.edu/reg/zs201009.htm, Computer Graphics, with 39 registered students, is the 2nd largest 4000-level course in ECSE. (ECSE-4760 Computer Communication Nets has 51.)

3.  Course calendar

4.  Homeworks

There will be about a dozen homeworks.

# Due Questions Answers
1 Sep 9 Homework 1 Solution
2 Sep 16 Homework 2 Solution
3 Sep 23 Homework 3 Solution
4 Sep 30 Homework 4 Solution
5 Oct 7 Homework 5 Solution
6 Oct 21 Homework 6 Solution
7 Nov 4 Homework 7 Solution
7 Nov 28 Homework 8

5.  Lectures

5.1  Lecture 1, Mon Aug 30


  1. Syllabus and Intro.
  2. AngelCG01.ppt: What is Computer Graphics?


  1. Angel, chapter 1.


  1. Homework 1 available.
  2. Pmwiki available for student use: Anyone who'd like to use a wiki group for the term project, as I use for the class, email me. Your material will be readable only by Peter and me (unless you wish to open it up).

5.2  Lecture 2, Thu Sep 2


  1. Chapter 1. The progress of Computer Graphics is largely the progress of hardware. We'll see more of this later. However, here's an intro.
    1. What physical principles are each type of HW based on?
      1. CRT: certain rare earth materials emit photons when hit by electrons. Explaining this is what got Einstein his Nobel (not relativity).
      2. LCD: electric field causes big asymmetric molecules to untwist so that they no longer rotate polarized light passing through them.
    2. What engineering challenges required solving?
      1. Shadow-mask CRT: electron beams travel varying distances at different angles, but don't hit the wrong phosphor even as the system gets hotter. The precision is 0.1%.
      2. Hi-performance graphics requires hi bandwidth memory.
      3. Virtual reality headsets require knowing where your head is and its angle (harder).
    3. What tech advances enabled the solutions?
      1. Raster graphics requires cheap memory.
      2. LCD panels require large arrays of transistors.
  2. AngelCG02.ppt: Image Formation
  3. simple2.c - simplest OpenGL program. Features:
    1. including required include file
    2. initializing OpenGL
    3. creating a top level window of default size and position
    4. setting window title
    5. defining and registering a display callback
    6. entering the main event loop
    7. clearing the frame (aka color) buffer to a default color (black)
    8. drawing a polygon with the default color (white)
    9. forcing pipeline to flush
    10. compiling and linking
  4. AngelCG03.ppt: Models and Architectures

Youtube videos useful for homework 1, from Wm Maio:

  1. Finding the Scalar Equation of a Plane http://www.youtube.com/watch?v=ISsO9Q4UCZw
  2. Finding the Point Where a Line Intersects a Plane http://www.youtube.com/watch?v=qVvvy5hsQwk&feature=related

5.3  Lecture 3, Thu Sep 9


  1. Engineering Grounded In Reality
  2. A little on API philosophy, e.g, Portability And Standards, and submarine patents.
  3. Finish AngelCG03.ppt: Models and Architectures
  4. my linux Makefile - YMMV
  5. Review of simple2.c.
  6. AngelCG04.ppt: Programming in OpenGL I
  7. simple3.c - slightly bigger OpenGL program
    1. setting vertex colors and observing polygon color
    2. overlapping polygons
  8. In-class mod of simple3 to add another polygon.
  9. In-class mod of simple3 to create vertices in a for-loop.
  10. AngelCG05.ppt Programming with OpenGL

Part 2: Complete Programs Reading:

  1. Angel, chapter 2.


  1. Homework 2 online.
  2. To compile the OpenGL examples in Visual C: If you get a redefinition error for exit, then do not include stdlib.h in your program. It is already included by another include file, and it lacks an inclusion guard.



5.4  Lecture 4, Mon Sep 13


  1. OpenGL important points:
    1. Coordinate systems
      1. World or object
      2. Camera (either left handed, or distance to object is MINUS z).
      3. Screen (pixels, origin in upper left)
    2. Windows / viewports (terminology is not standard)
      1. the whole screen
      2. the window created by OpenGL
      3. the viewport in it, which we are drawing into
      4. the clip window (really a truncated pyramid) in object space
    3. Color is part of internal state - it applies to future vertices from when set until changed
  2. AngelCG05.ppt review
  3. shape_test.c New features:
    1. OpenGL datatypes like GLfloat
    2. Allocate and enable depth (aka Z) buffer
    3. Perspective view
    4. Several utility polyhedra
      1. sphere, cone, cube, torus, dodecahedron, teapot, octahedron, icosahedron
      2. wire or solid
    5. Light source and color
    6. Enabling and disabling lighting
    7. Reshape callback
    8. Push and pop transformation matrix
    9. Rotate, scale, translate transformations
    10. Using viewport to draw into a small region of the window. Anything outside the viewport is clipped.
  4. GLUT - The OpenGL Utility Toolkit interfaces between OpenGL and your windowing system. It adds things, such as menus, mouse and keyboard interface, that were considered too platform-dependent and too far outside OpenGL's core mission to include in OpenGL. GLUT is platform independent, but quite basic. There are several alternatives, some of which are platform dependent but more powerful. You can't always have everything at once. However GLUT is the safe solution.
  5. AngelCG06.ppt Programming with OpenGL Part 3: Three Dimensions
  6. Demo, discuss, and modify gasket2.c . Features:
    1. Array of vertices passed to glVertex2fv
    2. Array of triangles
    3. Recursively creating the graphic object
    4. glBegin and glVertex2fv are in different routines. It's the order in which they are executed that matters, not their order in the source file.
    5. Parallel (ortho) projection.




  1. Textbook web site
  2. I've assembled some important OpenGL points here" OpenGL Design tradeoffs and notes

5.5  Lecture 5, Wed Sep 15

Topics: Nothing formal; just a chance to get help from Peter.

5.6  Lecture 6, Thu Sep 16


  1. AngelCG07.ppt Input and Interaction
  2. Demo, discuss, and modify gasket3.c . Features:
    1. 3D.
    2. Spec colors in an array.
    3. Reshape callback. It handles rectangular windows, keeping the tetrahedra undistorted, with the same aspect ratio, centered in the window.. Portrait and landscape mode are separate cases.
    4. glPostRedisplay
  3. Demo, discuss, and modify alpha.c . Features:
    1. color a triangle with a partially-transparent color, which, when drawn into the color buffer, will mix (blend) with the existing color.
    2. enable blending in OpenGL.
  4. AngelCG08.ppt Working with Callbacks
  5. Demo, discuss, and modify paint.c . Features:
    1. keyboard callback
      1. write the key at a position stored in a global and update that
    2. mouse callback
    3. accumulating info, such as triangle vertices, from successive callbacks
    4. converting coords from what is passed to mouse callback (origin is top left corner) to what is used by openGL window (origin is bottom left corner)
    5. picking a region of window by analyzing coords of mouse click.
    6. immediate mode: on redisplay, if it's not explicitly redrawn, it's not there any more.
    7. colors as unsigned bytes.
    8. using globals to pass data to/from callback routines.
    9. menus
      1. create
      2. add entry
      3. add submenu
      4. attach to mouse button
    10. menu callback
      1. arg is the int key associated with that menu entry
    11. pushing and popping attributes
    12. writing text
      1. setting position
      2. writing char
      3. updating position by width of char
  6. AngelCG09.ppt Better Interactive Programs





  1. Homework 3 online.

5.7  Lecture 7, Mon Sep 20


  1. finish paint.c
  2. AngelCG09.ppt Better Interactive Programs


  1. To people copying answers from last year's homeworks, when this year's question is slightly different: please read the Syllabus, section 14, point 10, here.

5.8  Lecture 8, Wed Sep 22

Topics: Nothing formal; just a chance to get help from Peter. In the regular lecture room, JEC4104.

5.9  Lecture 9, Thu Sep 23


  1. passivemotion.c. Changes the image depending on where the mouse is moving, using a mouse passive motion callback.
  2. motion.c. Here, you need to click the mouse, hold it down and move to change the color.
  3. single_double.c. Shows:
    1. The difference between single and double buffering. Note: This works on only some systems.
    2. Creating two graphics windows in one program. Note the order:
      1. Set the display mode.
      2. Create the window.
      3. Register the callbacks.
      4. Repeat for each window.
      5. Call MainLoop.
    3. Mouse input.
    4. Changing the idle callback. The new one replaces the previous one.
  4. AngelCG10.ppt Geometry. Most interesting points:
    1. Points vs vectors (in this context):
      1. A point is a position.
      2. A vector is a delta, a displacement or change from one point to another.
    2. Parametric representation of line
      1. given 2 endpoints: {$ P(t)=t A + (1-t) B $}
      2. given one point and the direction (tangent) {$ P(t) = A + tD $}
    3. Parametric representation of plane, given 3 points: {$ P(u,v) = $} {$ A + u(B-A) + v(C-A) $}
    4. Parametric representations of curves and surfaces are important later.
    5. Normal to plane: {$ N = (B-A)\times (C-A) $}. The length of N is probably not 1, so you'll then need to normalize it.
  5. getinfo.c. Shows how to read information about the OpenGL version and how to get internal state variables. This also shows how to access command line arguments. This shows just a sample; there are more.
  6. showinput.c. Shows how to get input. This also shows the coordinate system used to report mouse events. Units are pixels.
       (0,0) ... (xmax,0)


  1. Homework 4.
  2. Next Wed, Sep 29, will be a regular lecture, in JEC4104. (We may miss a few lectures in Nov.)
  3. The final exam will be Wed Dec 15, 6:30-9:30.

5.10  Lecture 10, Mon Sep 27


  1. Of interest, will not be examined: http://it.slashdot.org/story/10/09/27/1422205/Malware-Running-On-Graphics-Cards
  2. Beyond double buffering: How to avoid tearing caused by swapping the foreground and background buffers in the middle of refreshing the image and the two buffers have different images?
    1. One solution is to wait until the vertical retrace to swap the buffers. However, if each buffer takes about 1/60 second to recompute, sometimes more and other times less, then the refresh rate will fluctuate between 1/60 and 2/60 second.
    2. Another solution is to use 3 buffers. You display from the 1st, have the 2nd ready to swap with the 1st in the next vertical retrace, and meanwhile compute into the 3rd. This uses 50% more memory.
    3. How to fight tearing
    4. OpenGL Extension WGL_I3D_swap_frame_lock
    5. Smooth Gaming with Triple Buffering
  3. square2.c. Demonstrates glutMotionFunc callback. Change glutMotionFunc to glutPassiveMotionFunc to see what happens.
  4. AngelCG11.ppt Representation. Interesting points:
    1. Points in space don't need coordinates. E.g., you might name them. However, you need coordinates to work with them mathematically.
    2. You can imagine a fixed universal coordinate system.
    3. However, you can work with different coordinate systems for the same points. E.g., for an airplane:
      1. you might measure in meters from the nose with z pointing back, or
      2. in feet from the center of the wings with z pointing up, or
      3. ...
    4. You define a coordinate system by specifying (in terms of the universal coordinate system)
      1. its origin, and
      2. the directions of its 3 axes.
    5. If you know the coordinates of a point in one system, you can compute its coordinates in another.
    6. Homogeneous coordinates - big and important topic.
  5. manywindows.c. Shows that many top level windows (a new one with each left mouse click) can be dynamically created.


  1. Peter says that freeglut works fine in Visual Studio under Windows 7. You do need to set the path for the include files and libraries. See him for details.
  2. OpenGL Superbible edition 4 and 5 programs are online at Gfiles:SuperBible , copied from http://www.starstonesoftware.com/OpenGL/ and unzipped so you can browse them w/o downloading big zipfiles. There are Linux, Windows and Mac versions. The 4th edition is the most relevant, since the 5th edition is for the new version of OpenGL, which is more complicated, and which I'm not teaching.

5.11  Lecture 11, Wed Sep 29

Topics: This is a regular lecture.

  1. OpenGL platform dependencies:
    1. On some systems, such as my (expensive) Lenovo w700 laptop at home, both windows of single_double look the same. Presumably those systems have better graphics. They look different on the cheap Lenovo s10 laptop that I use in class.
    2. On some systems again like my w700, paint's screen does not clear when you hide and the expose the window. That is because the windowing system is storing the window's contents, so that the program does not have to redraw the window. However, I think that popping up a program menu still clears the window. Please report any counterexamples.
  2. Debugging OpenGL: The OpenGL FAQ and Troubleshooting Guide can be useful.
  3. more OpenGL reference material:
    1. I've been using the OpenGL Programming Guide, 6th edition. ($42 from Amazon. The 5th edition is online free. The differences are small. My mirror of the demo programs is Gfiles:OpenGL-1.4-ProgGuide.tgz .
    2. The OpenGL(R) SuperBible: Comprehensive Tutorial and Reference (4th Edition) ($51 from Amazon) is also excellent.
    3. So is Angel's OpenGL Tutorial, which is smaller.
  4. Tutorial on picking
  5. gasket3dl.c gasket3 with a display list. On my S10 netbook, it's twice as fast.
  6. My note on homogeneous coordinates and projections demoed by Albrecht Durer.
  7. AngelCG12.ppt Transformations
    1. Each type of transformation is a matrix.
    2. If applying several transformations, faster to first multiply the matrices, then just multiply all the points by that one matrix.

5.12  Lecture 12, Thu Sep 30


  1. picksquare.c picking and name list.
  2. pickdepth.c picking and name list.
  3. paintxor.c modified by paint.c to write triangles into the color buffer in XOR mode. Everything else is still written in COPY mode. XOR mode is useful for cursors and rubberbanding because XORing the same object twice restores the original buffer.
  4. feedback.c. Captures drawn objects, after transforming them, into an array instead of drawing them.
  5. My note on 3D rotation, start
  6. AngelCG13.ppt OpenGL Transformations
    1. Note that the last transformation catenated onto the current matrix is the first transformation applied to the object.
    2. More info is in chapter 4.


  1. Debugging tip: Some of our programs, like gasket2, read an argument from the command line, by reading argv[1]. If you don't give any arguments when you run the program, then argv has only one element, counting from 0, and argv[1] is undefined. If you're lucky, your program crashes, else it continues with garbage. The defensive programming solution is to check argc first.
  2. Homework 5 online, due next Thu Oct 7.
  3. Next Wed is also a normal lecture.

Lecture notes: lecture12.pdf.

5.13  Lecture 13, Mon Oct 4


  1. Bill Jacobs' OpenGL video tutorial on transformations and timers
  2. My note on 3D rotation, ctd
    1. all rigid transformations in 3D that don't move the origin have a line of fixed points, i.e., an axis, that they rotate around.
    2. deriving the vector formula for a rotation given the axis and angle
    3. computing the matrix from a rotation axis and angle
    4. testing whether a matrix is a rotation
    5. if it is, then finding the axis and angle


  1. If compiling paint.c in Visual Studio gives an error about redefining TEXT, then try putting the line
    #include <GL/glut.h>
    before the macro definitions such as
    #define NULL 0.

Lecture notes: lecture13.pdf.

5.14  Lecture 14, Wed Oct 6

A regular lecture. Topics:

  1. Quaternions. This is an alternative method to rotate in 3D. Its advantages are:
    1. It starts from the intuitive axis-angle API.
    2. Animating a large rotation in small steps (by varying the angle slowly) is easy. In contrast, stepping the 3 Euler angles does not work well, and there's no obvious way to gradually apply a {$3\times3$} rotation matrix, {$M$}. (You could compute {$M^{1/100}$} and apply it 100 times, but that computation is messy.)
    3. When combining multiple rotations, the axis and angle of the combo is easy to find.
    4. Having only 4 parameters to represent the 3 degrees of freedom of a 3D rotation is the right number. Using only 3 parameters, as Euler angles do, causes gimbal lock. That is, you cannot always represent a smooth rotation by smooth changes of the 3 parameters. OTOH, using 9 parameters, as with a matrix, gives too much opportunity for roundoff errors causing the matrix not to be exactly a rotation. (You can snap the matrix back to a rotation matrix, but that's messy.)
  2. AngelCG14.ppt Building Models
    1. This topic becomes ever more important as your models get bigger.
    2. The goal is to store large models in a more organized way, and then render them with fewer function calls.
    3. We start to see the separation of geometry from topology.
    4. A goal is to represent one piece of info, such as a vertex location, only once.
    5. Another goal is to store things that change more often (geometry), separately from things that don't (topology).

Lecture notes: lecture14.pdf.

5.15  Lecture 15, Thu Oct 7


  1. http://gpwiki.org/index.php/OpenGL:Tutorials:Theory nice example of pushing and popping the transformation matrix.
  2. Vertex array tutorial
  3. AngelCG15.ppt Classical Viewing
    This IMHO is largely obsolete. However you should recognize the terms. ''Vanishing points'' is useful for drawing perspective objects by hand.
  4. AngelCG16.ppt Computer Viewing
    1. There are utility routines to help specify the camera and projection.
    2. The big idea is view normalization or projection normalization. We want to view the object with our desired perspective projection. To do this, we transform the object into another object that looks like an amusement park fun house (all the angles and lengths are distorted). However, the default parallel projection of this normalized object gives exactly the same result as our desired perspective projection of the original object. Therefore, we can always clip against a 2x2x2 cube, and project thus: (x,y,z)->(x,y,0) etc.
      More info is in Angel, page 270 and the next slide set.
  5. AngelCG17.ppt Projection Matrices
    1. Not a lot new here; a review of view normalization and projection matrices. Don't worry about shears.


  1. Debugging tip: OpenGL is strict about what subroutine calls are allowed or forbidden between glBegin and glEnd. glVertex, glNormal and glColor must be between glBegin and glEnd. glRenderMode must not. Calling a subroutine in the wrong place does not seem to cause an error message, but leads to it being ignored.
  2. Homework 6 online, due next Thu Oct 14.

Lecture notes: lecture15.pdf.

5.16  Lecture 16, Mon Tue Oct 12


  1. OpenGL modelview vs projection matrices.
    1. 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).
    2. 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.
  2. AngelCG18.ppt Shading I
    1. Shading in general, not specific to OpenGL.
    2. The big idea is the Phong shading model.
  3. AngelCG19.ppt Shading II


  1. To print this page, click here: Printer friendlier format and print that. Printing the jquery version leads to boxes overlapping and hiding other boxes.

Lecture notes: lecture16.pdf.

5.17  Lecture 17, Wed Oct 13 Review

for midterm exam

  1. Old midterm exams
  2. Q and A:
    1. Will you cover shaders in the first exam? No since I haven't covered them in class.

Lecture notes: lecture17.pdf.

5.18  Lecture 18, Thu Oct 14 Midterm exam

  1. exam, solution.


  1. Homework 6 not due today; hand it in next Thu.

5.19  Lecture 19, Mon Oct 18


  1. SIGGRAPH 2009 Technical Papers Video Preview SIGGRAPH is the world's leading Computer Graphics conference. This preview shows you what some current research is in CG. (Doing such things requires knowing the basics covered in this course.)
  2. AngelCG20.ppt Shading in OpenGL


  1. No lecture this Wed; just office hours, e.g., to discuss grading questions.
  2. RPI CDC has Dreamworks interviews set for Nov 9, due date for resumes Oct 31.

5.20  Lab, Wed Oct 20


  1. Each student has been emailed our view of his/her grades to date. If you didn't receive this, or have questions, please tell us.

5.21  Lecture 20, Thu Oct 21


  1. Term project intro; see the syllabus.
  2. Bill Jacobs' OpenGL video tutorial on lighting
  3. Nate Robins has some nice tutorials. Local copies of some of the files are here. Today, let's try these:
    1. Transformation tutorial.
    2. Projection tutorial.
    3. Shapes tutorial.
    4. Lightposition tutorial.
    Local copy of directories with executables and data files:
    1. linux,
    2. win32
  4. SIGGRAPH 2010 Emerging Technologies Trailer
  5. SIGGRAPH 2010 Technical Papers Trailer
  6. SIGGRAPH 2010 Live Real-Time Demos
  7. AngelCG21.ppt Implementation I - Rasterization, Clipping We now change from learning the API to studying how things are implemented under the API.
    1. How are the primitive graphics operations implemented?
    2. Don't worry about clipping efficiency.
    3. You do not need to know any of the clipping algorithms. However, FYI, the properties of Cohen-Sutherland line clipping are these:
      1. You still have to include the code for the detailed clipping since sometimes the C-S algorithm reports that it doesn't know.
      2. However often it can classify the line segment (or the box with everything inside) as either completely in or else completely out.
      3. In that case, the rest of the pipeline is faster.
      4. However you have to write more lines of code.
    4. When clipping a line, even though both ends are outside the window, part of the line may be inside.
    5. Clipping a triangle is more than just clipping the separate edges.
    6. Normalization is interesting.
  8. AngelCG22.ppt Implementation II - Clipping, Visibility
    1. The clipping pipeline is interesting.
    2. Clipping concave polygons can break them into pieces.
    3. Tesselating concave polygons - breaking them into triangles - is common.
    4. Some visibility (aka hidden surface) algorithms iterate through the objects, others iterate through the pixels.
  9. Properties of the various visibility methods:
    1. Painters:
      1. The painter's algorithm is tricky when faces are close in Z.
      2. Sorting the faces is hard and maybe impossible. Then you must split some faces.
      3. However sometimes some objects are always in front of some other objects. Then you can render the background before the foreground.
    2. Z-buffer:
      1. Subpixel objects randomly appear and disappear (aliasing).
      2. Artifacts occur when objects are closer than their Z-extent across one pixel.
      3. This happens on the edge where two faces meet.
    3. BSP tree:
      1. In 3D, many faces must be split to build the tree.
    4. The scanline algorithm can feed data straight to the video D/A. That was popular decades ago before frame buffers existed. It is popular again when frame buffers are the slowest part of the pipeline.
    5. A real implementation, with a moving foreground and fixed background, might combine techniques.


  1. The term project proposal is postponed until next week, Oct 28.
  2. Dr Tobi Saulnier, PhD (ECSE, RPI), Founder and CEO of 1st Playable Productions, LLC is expected to talk in class on the Nintendo 3DS next month. See this and this from The Business Review.

5.22  Lecture 21, Mon Oct 25


  1. cubeview2.c. Shows smooth shading the faces of a cube, and rotating it. See Angel 5.10.
  2. sphere2.c. Shows 3 modes of shading a sphere with different levels of accuracy.
  3. AngelCG23.ppt Implementation III
    1. Efficiency is not so interesting, now that GPUs are faster.
    2. I may skip Bresenham for now. Its current import is how it made an algorithm more efficient by changing how you look at the problem. It efficiently drew lines and circles mostly using only integer addition - no floating ops and no multiplication or division inside the loop.
    3. Bresenham presents the fast line and circle drawing algorithms better than the text.
  4. For more info on testing whether a point is in a polygon, see my note. Also see the comp.graphics.algorithms FAQ, question 2.03.
  5. The flood fill will fail if the interior is not connected. That happens when two close edges cause adjacent pixels to be set. It will also fail if there is a gap in the perimeter - the color will leak out.
  6. The scan line fill must handle special cases like a vertex being on a scan line. My solution is to pretend that any vertex on a scan line is really slightly above. This is a simple case of a serious technique called ''Simulation of Simplicity'' invented by Herbert Edelsbrunner.
  7. One problem with interpolating color inside a polygon is that you may be creating successive frames of a video. Then, the color must be consistent from frame to frame even as the object is moving.
    E.g. if a quadrilateral rotates, it may be triangulated differently depending on its orientation. The two different triangulations may get shaded differently.
  8. Anti-aliasing is a big and important topic.
  9. shadow.c. Shows how to create a shadow onto a flat surface by projecting the object onto that surface. See Angel 5.10.


  1. Craig Mundie, Chief Research and Strategy Officer at Microscoft, will present a Presidential Lecture More Like Us: Human-Centric Computing on November 2, at 3:00 PM at EMPAC. Professors are being officially encouraged to send our classes to this 'important event'.
    New trends in technology are transforming how we interact with computers. Increasingly intelligent devices and more natural experiences using voice, touch and gestures are starting to emerge in mobile applications and technologies such as Xbox 360 Kinect.
    Soon wall-sized displays, powered by ultrafast processors and advanced software, will enable the next generation of immersive computing experiences. Microsoft's Craig Mundie will discuss these trends and show some of the possibilities of human-scale interaction.
    Craig Mundie is Chief Research and Strategy Officer at Microsoft Corp. In this role, he oversees one of the world's largest computer-science research organizations, and is responsible for the company's long-term technology strategy. Mundie has spent much of his career building startups in various fields, including supercomputing, consumer electronics, healthcare, education and robotics, and remains active in incubating new businesses.
    For more than a decade, he has also served as Microsoft's principal technology-policy liaison to the U.S. and foreign governments, with an emphasis on China, India and Russia. Another long-standing focus for Mundie is privacy, security and cyber-security. Based on this work, he serves on the U.S. National Security Telecommunications Advisory Committee and the Task Force on National Security in the Information Age, and in April 2009 was appointed by President Barack Obama to the President's Council of Advisors on Science and Technology.
    Mundie holds a bachelor's degree in electrical engineering and a master's degree in information theory and computer science from Georgia Tech.

5.23  Lecture 22, Thu Oct 28


  1. AngelCG24.ppt Buffers
  2. OpenGL and images:
    1. Following the less is more design philosophy, OpenGL has no facilities for reading and writing image data to disk. It does let you bitblt data between its buffers and your arrays. Otherwise, use your choice of tools.
    2. Netpbm is a large set of standalone command line programs for processing and converting image files.
      These programs follow the Unix pipe metaphor, and can be chained together.
    3. Imagemagick is another large set of standalone command-line programs for mogrifying images.
    4. You can run any standalone program from inside your C program with the system call. The only way to get info back and forth between that program and your program is via a file. It is dangerous to run system with an argument partly supplied by the user unless you thoroughly check for metachars. That, in a slightly different context, is the flaw exploited by the SQL injection attack on RFID tags.
    5. xv is a nice interactive shareware program. I actually bought 2 licenses years ago.
    6. PPM (portable pixmap) is a file format that is so simple you can easily write programs to read or write it. Its files are big, but you can use one of the other above systems to convert. I showed this in class, and Angel's slides also do.
  3. Bill Jacobs' OpenGL video tutorial on textures

5.24  Lecture 23, Mon Nov 1


  1. SIGGRAPH 2008 animation preview
  2. Bill Jacobs' OpenGL video tutorial on putting it all together
  3. AngelCG25.ppt Texture mapping The hard problems with texture mapping are:
    1. Determining what texel in the texture map corresponds each pixel in the frame buffer. The involves inverting some complicated mappings.
    2. That the pixel in the frame buffer is rarely the same size as the corresponding texel, but may be much larger or smaller. That varies with the distance of the object from the camera. Solutions include various smoothing techniques, and using a hierarchy of texture maps of different resolutions.
  4. AngelCG26.ppt OpenGL Texture mapping
  5. http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06 another nice and very detailed texture programming tutorial, from Neon Helium productions

5.25  Thu Nov 4

No class; WRF and students presenting papers at ACM SIGSPATIAL GIS 2010.

5.26  Lecture 24, Mon Nov 8


  1. Dreamworks presentation in Sage 5101

5.27  Lecture 25, Tue Nov 9


  1. Optional dreamworks presentation in Sage 4510 (optional only since this is not the regular class time).

5.28  Lecture 26, Thu Nov 11


  1. Guest lecture by Dr Barbara Liskov, 2009 Turing Award winner, on ''The Power of Abstraction'', Biotech auditorium. Details.

5.29  Lecture 26, Mon Nov 15


  1. Anti-aliasing: Image of 2 ribbons winding around each other, anti-aliased with 4 samples/pixel and then with 256 samples/pixel, from Lindsay Williams, http:///www.open-eyed.com/:
  2. tutors_src.zip. Nate Robbins's tutorials (ctd). (optional, for your reference, not covered in lecture)
    1. fog
    2. texture
  3. http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06 another nice and very detailed texture programming tutorial, from Neon Helium productions (optional reference)
  4. Texture mapping tutorial
  5. AngelCG27.ppt Compositing and blending - We'll just do an executive summary.
  6. AngelCG28.ppt Programmable pipelines
  7. AngelCG29.ppt GLSL I
  8. Vertex and fragment shaders from chapter 17 of the excellent Open GL SuperBible. See also http://www.pdf-search-engine.com/the-opengl-superbible-pdf.html. The example programs are here.
  9. GPUs: (optional reference)
    1. Wikipedia:Graphics_processing_unit
    2. Wikipedia:Radeon_R700
    3. http://ati.amd.com/products/radeonhd4800/overview-4890.html
    4. http://www.anandtech.com/printarticle.aspx?i=3354
    5. http://hardware.slashdot.org/article.pl?sid=09/04/02/193256
    6. http://www.extremetech.com/article2/0,2845,2344294,00.asp
    7. http://www.phoronix.com/scan.php?page=article&item=amd_radeon_hd4890&num=1
    8. http://www.gpureview.com/
  10. GPGPU: (optional reference)
    1. http://www.gpgpu.org/
    2. http://graphics.stanford.edu/%7Ekayvonf/papers/fatahalianCACM.pdf - A closer look at GPUs
    3. http://gates381.blogspot.com/
    4. http://graphics.stanford.edu/~kayvonf/official/index.html
    5. http://s08.idav.ucdavis.edu/
    6. http://s08.idav.ucdavis.edu/luebke-nvidia-gpu-architecture.pdf
    7. http://s08.idav.ucdavis.edu/luebke-cuda-fundamentals.pdf
  11. Wikipedia on shaders: (optional reference)
    1. Wikipedia:Shader
    2. Wikipedia:Vertex_shader
    3. Wikipedia:Geometry_shader
    4. Wikipedia:Pixel_shader
    5. Wikipedia:Unified_shader_model
    6. Wikipedia:Shading_language
    7. Wikipedia: OpenGL Shading Language
    8. Wikipedia: Comparison of OpenGL and Direct3D
  12. GPU Programming For The Rest Of Us Note the matrix multiplication example.


  1. Homework 8, due in 2 weeks.
  2. See Peter Honig to sign up for a date to present your final project to class.
    1. Each team is to make one presentation.
    2. The possible dates are Dec 6, 8, and 9.
    3. Each day has room for 15 presentations.
    4. Quite possibly everyone will fit into Dec 8 and 9. In that case I'll give a regular lecture on Dec 6.
    5. You must send your timed (to take 5 min) powerpoint file to Peter by midnight the day before.

5.30  Thu Nov 18

No class; WRF and students presenting papers at Autocarto 2010.

5.31  Lecture 27, Mon Nov 22


  1. Size of term project: It's impossible to specify how many lines of code makes a good term project. E.g., I take pride in writing code that is can be simultaneously shorter, more robust, and faster than some others. See my 8-line program for testing whether a point is in a polygon here.
    1. According to Big Blues, when Bill Gates was collaborating with IBM around 1980, he once rewrote a code fragment to be shorter. However, according to the IBM metric, number of lines of code produced, he had just caused that unit to officially do negative work.
    2. Some winners of ''The International Obfuscated C Code Contest (IOCCC)'', http://www.ioccc.org/, implement graphics projects in amazingly short programs. My local cache is here: ioccc/. Note the beautiful formatting of many programs.
      1. gavare.c is a 28 line ray-tracing program producing this: gavare.jpg (as a pnm file).
      2. vik1.c is a 63 line interactive color auto racing program.
      3. banks.c is a 60 line interactive flight simulator.
      4. eldby.c is a 8 line flying spheres program. However its graphics is pretty primitive.
      5. williams.c is a 73 line missile command game.
      6. dodsond1.c is a 72 line Othello game, which beats me.
      7. buzzard.c is a 31 line 1st person maze walker with perspective display.
      8. tvr.c is a 115 line interactive fractal program that puts up 2 X windows.
  2. AngelCG30.ppt GLSL II
  3. Shader examples from the OpenGL SuperBible, 4th edition, starting with chapter 15. local linux cache. Notes:
    1. That has 2 parallel trees:
    src has the source code. projects has the Makefiles and data files, and will contain the executable code. Make will reach sideways into the source tree. Run the executable in the dir it was compiled into, in the projects tree.


  1. SIGGRAPH, 7-11 Aug 2011, is seeking student volunteers. This is an excellent opportunity. See http://sv.siggraph.org/.
  2. Thanksgiving trivia question: What language did Samoset, the first Indian to greet the Pilgrims, use?
  3. Answer: http://www.holidays.net/thanksgiving/pilgrims.htm
  4. Q2: How many European countries had Squanto, the 2nd Indian to greet the Pilgrims, visited?

5.32  Thu Nov 25

No lecture. Optional reading material:

  1. SIGGRAPH 91 and 92 preliminary programs. This is a bowdlerized version, from whence I have removed items that might give offense.
  2. Raytracing jello brand gelatin

5.33  Lecture 28, Mon Nov 29

  1. GLSL ctd. The slides are incomplete here. See the textbook section 9.5, p 460 and following, for essential details. I'll walk through this part of the book in class.
  2. more examples from the OpenGL SuperBible.
  3. http://s08.idav.ucdavis.edu/luebke-nvidia-gpu-architecture.pdf - just the highlights.
  4. AngelCG31.ppt Hierarchical Modeling I
  5. AngelCG32.ppt Hierarchical Modeling II
  6. AngelCG33.ppt Graphical Objects and Scene Graphs


  1. After his office hours on Wed, Peter will make up the talk schedule for the final presentations.

5.34  Lecture 29, Thu Dec 2

  1. FYI: NVidia GPU Technology conference
  2. http://www.youtube.com/watch?v=Jz-7Di2s4yY created by Matthias Müller. He's really good with particle systems.
  3. AngelCG34.ppt Particle Systems
  4. http://youtu.be/7c4WYzr30B0?hd=1
  5. SIGGRAPH notes on particle systems
  6. Demo interactive curves in xfig
  7. AngelCG35.ppt Curves and surfaces - just do highlights; we've seen most of this before.
  8. AngelCG36.ppt Designing parametric cubic curves
  9. My tutorial on Bezier curves.
  10. AngelCG39.ppt Curves and surfaces in OpenGL

Lecture notes: lecture29.pdf.

5.35  Lecture 30, Mon Dec 6


  1. term project presentations
    1. Snyder, Michael
    2. Sullivan, Evan & Moreira, Luiz Philippe
  2. Video of Sebastian Thrun's keynote talk at this year's NVidia technical conference. (This is a baseline of a good term project, given that Thrun was hampered by being at Stanford not RPI.) (Local cache).
    What really causes accidents and congestion on our roadways? How close are we to fully autonomous cars? In his keynote address, Stanford Professor and Google Distinguished Engineer, Dr. Sebastian Thrun, will show how his two autonomous vehicles, Stanley (DARPA Grand Challenge winner), and Junior (2nd Place in the DARPA Urban Challenge) demonstrate how close yet how far away we are to fully autonomous cars. Using computer vision combined with lasers, radars, GPS sensors, gyros, accelerometers, and wheel velocity, the vehicle control systems are able to perceive and plan the routes to safely navigate Stanley and Junior through the courses. However, these closed courses are a far cry from everyday driving. Find out what the team will do next to get one step closer to the holy grail of computer vision, and a huge leap forward toward the concept of fully autonomous vehicles.


  1. Each talk schedule is posted on the relevant class day.
  2. Remember to get your powerpoint file to Peter by the night before your talk.
  3. Would you like a review class next week? Do you prefer Mon or Tues afternoon?

5.36  Lecture 31, Wed Dec 8

term project presentations

  1. Carozza, Ernest
  2. Dawkins, Matthew
  3. Davis, Michael
  4. Narayanan, Sriram
  5. Greenwood, Jen & Huamam, Moises
  6. Jani, Meghal
  7. Kasi, Aditya & Templer, Gavin
  8. Trexler, Marc
  9. Graybill, Morgan & Ingulli, Peter
  10. Chitester, Brian & Hunter, Travis
  11. Safran, Josh

5.37  Lecture 32, Thu Dec 9

term project presentations:

  1. Sheedy, Aileen
  2. Ding, Michael
  3. Jalbert, John & Meretzky, Daniel
  4. Andryauskas, Michael & Dewitt, James
  5. Donnelly, Jarred
  6. Kennan, Ziv & Diaz, Melvin
  7. Staib, Michael
  8. Kolar, Albert
  9. Schwartz, John
  10. Bourland, Eric
  11. Salvaggio, Mark & Natalie, Jesse & Ansell, Ashley
  12. Harbour, Harry & Capoccitti, Daniel
  13. Williams, Lindsey

5.38  Tues Dec 14

2-4pm review in Sage 4104.

5.39  Wed Dec 15

6:30 pm. Final exam, solution.

As usual, there was no relation between the speed that someone wrote the final exam at, and the grade achieved: