CG Homework 3, due Thu 2017-09-28 2359

Due date postponed because of inconsistencies in due dates.

  1. (10 pts) Part of changing from one coordinate system to another is scaling and making things fit. E.g., suppose that you had a square with lower left corner (llc) (0,0) and upper right corner (urc) (1,1). You want to scale and center it to just fit into a rectangle with llc (0,0) and urc (2,3). The square stays a square but is probably larger or smaller. Then, these equations would do it:

    x' = 2x
    y' = 2y + 1/2

    This question is to figure out how to make a rectangle from (0,0) to (2,3) fit into a square that is from (0,0) to (12,12).

  2. (10 pts) Consider a pinhole camera as discussed in slide 12 of ppt presentation 1_5. Let d=2. To where does the point (1,3,-3) project? Use the equation on that slide. x/z/d should be parenthesized as x/(z/d).

  3. (5) If your image has only 64 different colors across the whole image, how many bits per pixel do you need for the color buffer?

  4. (25) Extend your program from last week that displays the Starship Enterprise as follows:

    1. Add 3 sliders that will rotate it around the X-axis, Y-axis, and Z-axis respectively.
    2. Do the rotations the simplest (and least efficient) way. I.e., in your javascript program, have render rotate the matrix and resend it to the GPU.

(Total: 50 points.)

CG Class 6, Thu 2017-09-14

1   Your web files not visible?

  1. Read this if, when you browse to your public_html, you see only subdirs, not plain files.
  2. The problem is an Access Control List (ACL) setting on the dir.
  3. See them thus in an ssh session: fs la .
  4. system:anyuser needs to be rl, not l.
  5. dotCIO recently changed the default w/o telling anyone.
  6. Set the ACL thus: fs sa . system:anyuser rl (note the period).
  7. New subdirs inherit from their parents, but ACL changes do not propagate.
  8. So, you need repeat that command in any subdirs you already created.

2   Slides

We'll continue with the textbook powerpoint slides.

  1. 2_2, Programming with WebGL Part 1: Background.
  2. 2_3, Programming with WebGL Part 1: Background
  3. 2_4, Programming with WebGL Part 2: Complete Programs
  4. 2_5, Programming with WebGL Part 2: Complete Programs
  5. 3_1, Programming with WebGL Part 3: Shaders
  6. 3_2, Programming with WebGL Part 3: Shaders

CG Class 5, Wed 2017-09-13

2   Protecting your website

  1. By default, everything on https://www.rpi.edu/~RCSID/ is readable by anyone.
  2. Here's one way to add a low grade password.
  3. It relies on the facts that when a reader navigates to a directory.
    1. by default, the contents of the directory are listed, unless
    2. the dir contains the file index.html (or variants like index.htm).
    3. then that file is displayed instead of the directory contents.
    4. This behavior is controlled by various options in files like .htaccess, so there might be dirs where it doesn't happen.
    5. Nevertheless, except for that unusual case, the reader can't see the actual directory.
    6. However, any file (or subdir) that the reader knows about can be listed explicitly.
  4. So, do this:
    1. Create an empty file public_html/index.html
    2. Create a subdir with an unguessable name, like public_html/passw0rd/.
    3. Put your work in there.
    4. Its URL will be https://www.rpi.edu/~RCSID/passw0rd/
  5. There are also other harder ways to add passwords to directories.

3   Last year's course

If you're interested, the Fall 2016 version of this course is here. This year is 90% the same.

4   Linear algebra tutorial

  1. For students confused by the linear algebra questions on homework 1, the following may help:

    1. vector methods.
    2. Vector Math for 3D Computer Graphics
    3. Working with vectors, from Maths: A Student's Survival Guide
  2. Also see wikipedia.

  3. Some older graphics texts have appendices summarizing the relevant linear algebra.

  4. The scalar (dot) product is needed to do things like this:

    1. compute how a ball bounces off a wall in pong
    2. compute lighting effects (how light reflects from a surface)
  5. The cross product's applications include:

    1. compute torque and angular momentum.
    2. compute the area of a parallelogram.

    It is the only operator that you'll probably ever see that is not associative. Ax(BxC) != (AxB)xC.

  6. The triple product (A.BxC) computes the volume of a parallelepiped.

5   Programming

  1. Serpinski gasket programs showing more complicated WebGL.

    We play with the code to see what changes.

  2. Notes from yesterday:

    1. gasket4 shows how to do 3D with a depth buffer.

      Each pixel now stores

      1. RGB color of the object that was drawn at that pixel
      2. distance (depth) to that object.

      When a new object is drawn over that pixel, it replaces old color and depth only if the new object is closer. So, close objects hide distance objects.

      We'll ignore the problem of an object that covers only part of the pixel.

    2. gasket5 shows an interactive program with a slider and callback. The user changing the slider causes a javascript function to be called.

  3. Graphics display hardware: 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 HARDWARE 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).

      Think of 3 ways to do this.

    3. What tech advances enabled the solutions?

      1. Raster graphics requires cheap memory.
      2. LCD panels require large arrays of transistors.
  4. Note on Engineering Grounded In Reality and famous graphics alumni.

  5. Executive summary of Portability And Standards.

6   Homeworks

  1. Homework 2 is really due next Mon Sep 18 2359.
  2. You may do web exercises on any computer; RCS is not required.
  3. Instead of putting your files on afs, it's ok to submit a zipped file, containing your .js and .html files and the utility files needed to run it. It must be organized so that if we unzip into a random location and point the browser at the .html file, then it will work.

CG Class 4, Mon 2017-09-11

2   Today's material

  1. Serpinski gasket programs showing more complicated WebGL.

  2. Extra material on colors

    1. Tetrachromacy

      Some women have 2 slightly different types of green cones in their retina. They see 4 primary colors.

    2. Metamers

      Different colors (either emitted or reflected) with quite different spectral distributions can appear perceptually identical. With reflected surfaces, this depends on what light is illuminating them. Two surfaces might appear identical under noon sunlight but quite different under incandescent lighting.

    3. CIE chromaticity diagram

      This maps spectral colors into a human perceptual coordinate system. Use it to determine what one color a mixture of colors will appear to be. The curve of pure spectral colors was determined experimentally.

      1. More info: http://wikipedia.org/wiki/CIE_xyY .
      2. Purple is not a spectral color.
    4. Color video standards: NTSC, SECAM, etc

    5. My enrichment note on NTSC And Other TV Formats. NTSC, the American analog TV standard, is now getting obsolete. However it was a beautiful example of engineering design. First B&W TV was invented. Then color was added in a way that was upward compatible, downward compatible, and used no more bandwidth.

    6. Failed ideas: mechanical color TV. http://en.wikipedia.org/wiki/Mechanical_television (enrichment).

    7. Additive vs subtractive colors.

      1. http://www.physicsclassroom.com/Physics-Interactives/Light-and-Color/RGB-Color-Addition/RGB-Color-Addition-Interactive
    8. Sensitivity curves of the 3 types of cones vs wavelength.

      1. http://i.stack.imgur.com/5snTb.png
    9. Material reflectivity vs wavelength.

    10. Incoming light intensity vs wavelength.

    11. Retina is a neural net - Mach band effect. When one cone is brightly lit, it inhibits its neighbors from firing so easily. This acts like a high frequency filter, to emphasize small details in the scene. Note: the details of how this works are uncertain.

  3. Angel's slides: http://www.cs.unm.edu/~angel/BOOK/INTERACTIVE_COMPUTER_GRAPHICS/SEVENTH_EDITION/PPT/

I'll do in class:

#. Week 2, set 1, Models and architectures #.

3   Homeworks

  1. Homework 2 is online; due next Mon 1159pm.

CG Homework 2, due Mon 2017-09-18

Rules

  1. You may work in teams of 2. Each team should submit their solution under only 1 student's name, but mention both people at the top of the submission. The other student's submission should just name the lead student. (This makes it easier for us to track things and to avoid grading it twice.)

  2. Hand in your solution on RPILMS. As for formats, we'll take (at least) a scanned image of a neatly handwritten page, raw text, PDF, and MS Word.

  3. For the programming question, pick whichever you prefer to get us the code:

    1. Submit a zipped file, containing your .js and .html files and the utility files needed to run it. It must be organized so that if we unzip into a random location and point the browser at the .html file, then it will work.

      It might be easier to move the utility .js files into the same directory as your code (and adjust the include lines).

    2. Put the code on a web server such as RCS.

Questions

  1. (5 pts) Which RPI grad was the technical person in the founding group of NVidia?

  2. (5 pts) What hardware component had to get much cheaper in order to make frame buffers possible?

  3. (5 pts) The progress of computer graphics has always been enabled by new hardware. One newish toy is Google Cardboard. Pretend that I've never heard of it, and write 100 words or so summarizing it and giving specific details.

  4. (20) Modify last week's program to display the spaceship NCC1701.

    1. The data is in the file ncc1701b.data . Each line gives the vertices of one triangle as follows:

      x1 y1 z1 x2 y2 z2 x3 y3 z3

    2. Insert the data into your javascript file and try displaying it.

    3. If this is too much data, then reduce the number of triangles until something displays. Report what went wrong, and how many triangles could be displayed.

    4. You might have to scale the data to fit. I'll let you figure out the easiest way to do that. The problem is that last week's square had coordinates in the range from -1 to 1, while the NCC1701 does not.

    5. Attach a PDF of any files you modified and a screendump. If the file has a multi-thousand line array, it's ok to delete the middle.

  5. (5) In real life, light bounces from object to object, on its way from the light source to the viewer. However, the OpenGL pipeline processes objects independently, and does not allow that (except the an object can hide another object). Why?

  6. (10) According to the tristimulus model, our eyes have three types of color receptors (cones). However several species and some rare human females have four types of cones. They are called tetrachromats.

    1. Name some such animals.
    2. For humans, why is it (probably; opinions differ) only females?

(Total: 50 points.)

CG Class 3, Thurs 2017-09-07

1   LMS notes

  1. I forgot that LMS had copied over all of last year's assignments. Sorry, they're deleted now. #. This year's assignments are a little different. Some careful people noticed. #. If you really want to see last year's they're available on last year's course page.
  2. I'm using LMS only for students to submit work and for TAs to submit grades. The text of the assignments will be only on the course page.

2   Homework 1 hints

  1. Mac users: ssh to rcs.rpi.edu with terminal.
  2. Windows users: install putty. Unfortunately I'm not allowed to install SW on the classroom PC and so can't demo it.
  3. Linux: run ssh to login to rcs.rpi.edu.
  4. For copying files:
    1. For a few small files, cut and paste.
    2. Windows: install winscp or filezilla.
    3. From inside your rcs account: wget copies the contents (files or dirs) specified by a URL.
    4. With an AFS client program, your RCS directory is read and writable from another computer. On linux, that's the openafs-client package.
    5. From any OS, you may be able to mount your RCS dir as a share thus: sftp://rcs.rpi.edu .
  5. Other platforms: ?

3   Angel

  1. Angel's slides are here: http://www.cs.unm.edu/~angel/BOOK/INTERACTIVE_COMPUTER_GRAPHICS/SEVENTH_EDITION/PPT/
  2. Read week 1, sets 1-4 on your own.
  3. I'll do in class:
    1. Week 1, set 5, Image Formation

CG Class 2, Wed 2017-09-06

1   Piazza

Because of the size of this class, I've set up a class Piazza discussion . Post your non personal questions here. You are encouraged to answer other students' questions. The TAs will monitor this and reply. I may answer questions that remain unanswered for too long.

2   Teaching assistants

  1. The TAs are:

    1. Xiangyang Mou, moux4@x.edu, office hours TBD. Replace 'x' by (you figure it out).
    2. Qiushi Gong, gongq@x.edu, office hours W11 in the flip flop lounge JEC 6037.

    They will also come to the Wed labs to help people.

3   Homework 1 extended

The new due date is Mon 9am.

4   Today

  1. Today will start with a demo of the program in the homework and help in getting started.
  2. There was no lecturing.

CG Homework 1, due Mon 2017-09-11, 9am

Hand in your solution on RPILMS. You may work in teams of 2. Each team should submit their solution under only 1 student's name, but mention both people at the top of the submission. The other student's submission should just name the lead student. (This makes it easier for us to track things and to avoid grading it twice.) As for formats, we'll take (at least) a scanned image of a neatly handwritten page, raw text, PDF, and MS Word.

  1. (4 pts) One graphics pioneer was Ivan Sutherland. Name an influential tool that he created and an influential algorithm that he helped create.

  2. (4) Consider these 3-D vectors: A=(0,4,2), B=(5,2,3), C=(8,7,9). Compute:

    1. A.(BxC)
    2. (AxB).C
  3. (4) (This is another a test of your linear algebra knowledge. Feel free to refer to books to find the correct formulae.)

    Suppose that we have a plane in 3-D thru the points A(4,2,0), B(2,2,0), and C(0,1,1).

    1. What is its equation, in the form ax+by+cz+d=0 ?
    2. Consider the line L thru the points O(0,0,0) and P(1,1,1). Where does this line intersect the plane?
  4. (4) Modify the program in http://www.cs.unm.edu/~angel/WebGL/7E/CLASS/square.html , which calls several other files, to display shapes that are the first initials of the last names of the team members.

    1. Assume that your RCSID is STUDENT. In the following, replace STUDENT with your RCSID.
    2. From an RPI windows machine, click the AFS RPI icon create a share with your RCS files.
    3. Go into public_html.
    4. Create a folder called homeworks.
    5. Copy the folder https://wrf.ecse.rpi.edu/Teaching/graphics-f2016/SEVENTH_EDITION/CODE/Common/ into homeworks.
    6. Create a subfolder homework1 under homeworks.
    7. Copy files https://wrf.ecse.rpi.edu/Teaching/graphics-f2016/SEVENTH_EDITION/CODE/CLASS/square.html and https://wrf.ecse.rpi.edu/Teaching/graphics-f2016/SEVENTH_EDITION/CODE/CLASS/square.js into that folder.
    8. Change them to answer the homework.
    9. Look at your answer by browsing to https://www.rpi.edu/~STUDENT/homeworks/homework1/square.html

    When you've solved that question:

    1. Put your answers to all the homework questions in some file, even on your own PC.

      Include listing for the files you changed for square.

      Mention the URL to access your modified square, e.g., https://www.rpi.edu/~STUDENT/homeworks/homework1/square.html

    2. Upload that file of answers to LMS.

    The TAs will be glad to help with any problems.

  5. (2) Do exercise 1.1 from the textbook, page 37.

  6. (2) Do exercise 1.8 from the textbook, page 38.

(Total: 20 points.)

CG Lecture 1, Thurs 2017-08-31

  1. Discuss Syllabus.
  2. Intro to OpenGL.
    1. It's a platform-neutral competitor to DirectX. See http://en.wikipedia.org/wiki/Comparison_of_OpenGL_and_Direct3D .
    2. The competition improves both.
    3. The designers made a decision to do ''only rendering'', no input, audio, or windowing.
    4. The OpenGL standards committee gradually adds and subtracts features.
    5. The goal is to exploit the latest GPUs while keeping the size manageable.
    6. This makes the ''hello world'' program much longer, but makes complicated graphics more efficient.
    7. OpenGL4 exploits latest GPU features. However many expensive business laptops, such as my Thinkpad x201 cannot run it.
    8. OpenGL4 being lower level opens a niche for a replacement easy-to-use graphics API. I recommend Qt.
    9. Tools like Blender are higher-level, very good for realistic scenes, but too fancy for simple graphics programming. I'll leave them to other classes.
    10. See http://en.wikipedia.org/wiki/Opengl .
    11. WebGL is an API for HTML5.
    12. This course uses JavaScript because web-based graphics is easier with it.
    13. Although JavaScript is less efficient than C++, the serious graphics computing is done on the graphics card.
    14. The OpenGL API for C++ is quite similar to JavaScript's. Instead of the JavaScript framework, you need a C++ toolkit to provide the the higher level functions that OpenGL chose not to provide. This includes creating windows. GLUT is one such toolkit. It is widely used but old. There are other newer ones.
  3. Why is this course different?
    1. Shader-based
    2. Most computer graphics use OpenGL but still use fixed-function pipeline, don't require shaders, do not make use of the full capabilities of the graphics processing unit (GPU)
    3. Web: With HTML5, WebGL runs in the latest browsers. Makes use of local hardware, No system dependencies.
  4. Some web resources
    1. http://www.cs.unm.edu/~angel/
    2. http://www.cs.unm.edu/~angel/WebGL/7E
    3. http://www.opengl.org
    4. http://get.webgl.org
    5. http://www.kronos.org/webgl
    6. http://www.chromeexperiments.com/webgl
    7. http://learningwebgl.com
  5. Long history of attempts at a good API described in text.
  6. OpenGL, 1992:
    1. platform-independent API that was
    2. Easy to use
    3. Close enough to the hardware to get excellent performance
    4. Focus on rendering
    5. Omitted windowing and input to avoid window system dependencies
  7. OpenGL evolution
    1. Originally controlled by an Architectural Review Board (ARB)
    2. Members included SGI, Microsoft, Nvidia, HP, 3DLabs, IBM,…….
    3. Now Kronos Group
    4. Was relatively stable (through version 2.5)
    5. Backward compatible
    6. Evolution reflected new hardware capabilities
    7. 3D texture mapping and texture objects
    8. Vertex and fragment programs
    9. Allows platform specific features through extensions
  8. Modern OpenGL
    1. Performance is achieved by using GPU rather than CPU
    2. Control GPU through programs called shaders
    3. Application’s job is to send data to GPU
    4. GPU does all rendering
  9. Immediate Mode Graphics
    1. Geometry specified by vertices
      1. Locations in space (2 or 3 dimensional)
      2. Points, lines, circles, polygons, curves, surfaces
    2. Immediate mode
      1. Each time a vertex is specified in application, its location is sent to the GPU
      2. Old style uses glVertex
      3. Creates bottleneck between CPU and GPU
      4. Removed from OpenGL 3.1 and OpenGL ES 2.0
  10. Retained Mode Graphics
    1. Put all vertex attribute data in array
    2. Send array to GPU to be rendered immediately
    3. Almost OK but problem is we would have to send array over each time we need another render of it
    4. Better to send array over and store on GPU for multiple renderings
  11. OpenGL 3.1
    1. Totally shader-based
      1. No default shaders
      2. Each application must provide both a vertex and a fragment shader
    2. No immediate mode
    3. Few state variables
    4. Most 2.5 functions deprecated
    5. Backward compatibility not required
      1. Exists a compatibility extension
  12. Other Versions
    1. OpenGL ES
      1. Embedded systems
      2. Version 1.0 simplified OpenGL 2.1
      3. Version 2.0 simplified OpenGL 3.1
      4. Shader based
    2. WebGL
      1. Javascript implementation of ES 2.0
      2. Supported on newer browsers
    3. OpenGL 4.1, 4.2, …..
      1. Add geometry, tessellation, compute shaders
  13. Source of much of this material: slides accompanying the text.
  14. Reading assignment: Angel, chapter 1.
  15. Homework 1 is online; due next Thurs 9am.
  16. Next Wed Sep 6 will be a lecture and SW session, held in the usual lab room.

CG Syllabus

This page is the syllabus for the ECSE-4750 Computer Graphics Fall 2017.

This will be much the same as the old course site.

The requirements for ECSE 6964-01 are everything in 4750-01 plus an extra research paper.

1   Course content

1.1   Catalog description

ECSE-4750 Computer Graphics

Introduction to Interactive Computer Graphics, with an emphasis on applications programming. Objects and viewers, and the synthetic camera model. Graphics architectures, the graphics pipeline, clipping, rasterization, and programmable shaders. Input and interaction. Geometric objects, homogeneous coordinates, and transformations. Viewing, hidden surface removal, frame and depth buffers, compositing, and anti-aliasing. Shading, light and materials, texture mapping, ray tracing, and radiosity. Intellectual property concerns. Extensive programming with the OpenGL API. Prerequisite: ECSE-2610 Computer Components & Operations, or CSCI-2500 Computer Organization, or equivalent. Fall term annually. 3 credit hours

CRN: 45161

1.2   Why take this course?

To understand and control the universe.

The massive data sets being produced by cheap sensors are useless unless they can be understood by people. Complicated machines are useless unless they can be easily controlled. This course will help you do both. The key is graphics and visualization. We don't just teach useful platform-independent tools. We also teach the underlying math and algorithms used by all tools so that you can design better tools.

1.3   How this course relates to other graphics courses at RPI

  1. My course gives you the math and programming skills to create the next generation replacements for the higher level tools that other courses use.
  2. OpenGL is the low-level assembly language of computer graphics. It gives you a more direct control of the HARDWARE. Higher level tools, like Blender, build on top of OpenGL. Higher level concepts, like ray tracing, are implemented in OpenGL.
  3. OpenGl is preferable to DirectX because OpenGl is open, vendor-neutral, and OS-neutral.
  4. The problem with very high level tools, like Blender, is that they restrict what you can do if what you want is outside the Blender model. You would use OpenGL to create Blender's replacement.
  5. Only OpenGl small enough to make available on smartphones.

1.4   Overall Educational Objective

To provide students with a foundation in graphics applications programming.

1.5   Learning Outcomes

  1. to develop a facility with the relevant mathematics of computer graphics, e.g.,
    1. 3D rotations using both vector algebra and quaternions, and
    2. transformations and projections using homogeneous coordinations.
  2. to learn the principles and commonly used paradigms and techniques of computer graphics, such as
    1. the graphics pipeline,
    2. Splines and NURBS,
    3. ray tracing,
    4. visibility algorithms.
  3. to gain a proficiency with OpenGL, "a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics." - Wikipedia OpenGL is the most widely used platform-independent API, used on applications from games to virtual reality, implemented on platforms from mobile phones to supercomputers.

1.6   Why (Not) To Take This Course

Other courses might be a better fit if:

  1. You don't like programming.
  2. You don't like documenting your programs.
  3. You don't like math.
  4. You don't like reading.
  5. You don't like writing exams at the official scheduled times. The final exam may be as late as Dec 20.

OTOH, here are some reasons that you might prefer to take a course from me.

  1. I teach stuff that's fun and useful.
  2. I acknowledge that you are simultaneously taking several courses, and so try to make the workload fair. E.g., if you're taking 6 3-credit courses, then you should not be required to spend more than \(\frac{168}{6}\) hours per week per course :-).
  3. I try to base exam questions more on important topics that occupied a lot of class time, and which are described in writing, often on this wiki.
  4. I keep the course up-to-date and relevant.

1.7   Prerequisites

  1. This is a senior CSYS course, and assumes a moderate computer maturity, represented in the catalog by either listed prereq. If you don't have either specific course, talk to me.
  2. You also must know some high level language, such as C++, sufficient to learn Javascript. One of many good online tutorials is W3Schools JavaScript Tutorial.
  3. Computer Graphics also assumes that you know, or be able to learn, some basic linear algebra, up to the level of what an eigenvalue is.
  4. If you're uncertain about taking this course, then, by all means, talk to me, or to previous people in it. If there is one specific fact that is unfamiliar, such as eigenvalue, then there's no problem at all.

2   Instructors

2.1   Professor

h W. Randolph Franklin. BSc (Toronto), AM, PhD (Harvard)

Office:

Jonsson Engineering Center (JEC) 6026

Phone:

+1 (518) 276-6077 (forwards)

Email:

mail@wrfranklin.org or frankwr@rpi.edu

Email is my preferred communication medium.

Sending from a non-RPI account is fine (and is what I often do). However, please use an account that shows your name, at least in the comment field. A subject prefix of #CG is helpful. GPG encryption is welcomed.

Web:

https://wrf.ecse.rpi.edu/

Office hours:

After each lecture, usually as long as anyone wants to talk. Also by appointment.

Informal meetings:
 

If you would like to lunch with me, either individually or in a group, just mention it. We can then talk about most anything legal and ethical.

Background:

I've been doing graphics related programming since the 1960s, and have been teaching versions of this course since 1982. I've been at RPI since 1978, apart from several absences, including a year at Berkeley, 3 months at Genoa (Italy), and shorter times at Laval University in Quebec City (Canada), the Commonwealth Scientific and Industrial Research Organization in Canberra (Australia), and the National University of Singapore. I also spent 2 years 7 months as Director of the Numeric, Symbolic, and Geometric Computation Program at the National Science Foundation, recommending how to spend about $30M of your tax dollars (thanks!).

A recent funded research project was (together with Cutler and Zimmie) modeling how levees fail when overtopped during a flood. Google Scholar thinks that I've co-authored 47 xxxxxxxxxx papers that each have been cited at least 10 times.

Another recent completed research project was on representing terrain elevation, and compressing it, and siting observers and planning paths on it, was largely supported by the Defense Advanced Research Projects Agency. DARPA people are crazy. My main worry was that I wasn't crazy enough for them.

In the summer of 2013, I was sponsored by FAPEMIG, the science funding agency of the state of Minas Gerais in Brazil to spend a month in Brazil working with researchers at various universities.

I also like to examine terrain on foot; in summer 2008 I walked 164km, including 11km up, from Chamonix to Zermatt, in 12 days (the Haute Route). In March 2009, I hiked the Grand Canyon from south rim to Colorado River and back in one day. I spent July 2009 visiting universities in Brazil, with a few days kayaking down the Urubu R, a tributary of the Amazon, sleeping in a hammock tied to trees, and hiking for hours through the jungle. In July 2014 I hiked the Zion Virgin River Narrows slot canyon top-down. In 2015, I finished hiking all of the 115 4000' peaks in the northeast (the NE111).

2.2   Teaching assistant

  1. TBD
  2. Office hours:
    1. ECSE Flip Flop lounge in JEC 6037.
    2. Tuesdays and Fridays at 9am. TBD
  3. He will try to stay as long as there are students asking questions, but will leave at 9:15 if no one has arrived.
  4. Come near the start of the time; if there is no one there he may leave.
  5. If you need more time, or a different time, then write, and he will try to accommodate you.
  6. He also attends most lectures.

3   Course websites

3.1   Homepage

This current page https://wrf.ecse.rpi.edu/Teaching/graphics-f2017/ has lecture summaries, syllabus, homeworks, etc.

3.2   Google calendar

This Google calendar lists classes, assignments, due dates, TA office hours, etc. You may display it together with other Google calendars or import into into various other calendar programs, like Thunderbird.

  1. I will update the calendar as the semester progresses.
  2. The titles of all events on this calendar will start with CG. This will be useful if you are displaying several calendars together.

4   Reading material

4.1   Textbook

  1. Interactive Computer Graphics: A Top-Down Approach with WebGL, Seventh Edition, Edward Angel; Dave Shreiner.

    I picked this book because it covers WebGL, which is more portable, and because it has better supplementary material. Also, this book is widely used by other colleges.

  2. Textbook author's site, containing assorted stuff, like slides and code.

4.2   My notes on various graphics topics

These will supplement the text. I'll link them in to the lecture notes at the appropriate times.

4.3   Assorted online material

There is a lot of good, free, online material about OpenGL and graphics in general. I'll mention some of it; Google can find more.

5   Computer systems used

You will need the following computer systems; they could all be on one computer.

Public web server:
 

This course will use platform-independent OpenGL computer graphics written in Javascript and displayed with any major browser, including smart phones.

You will need to be able to create web pages with extensions .js and .html (or .htm) on some web server. RCS will do. The URL to display the pages will be something like http://www.rpi.edu/~frankwr/ .

How you upload the files to RCS depends on where you're coming from.

  1. From my linux box, the location is /afs/rpi.edu/home/56/frankwr/public_html/ .
  2. From an RPI windows machine, you connect a network share. There's an icon labeled something like RPI-AFS.
  3. Filezilla and sftp are also said to work.
  4. If you're off campus, you need to start the VPN first.

You are free to use any other server that the TA and I can access.

Web client:

You will need a web browser that can render and interact with WebGL pages. Most modern browsers, including smart phones, work.

You do not need a discrete graphics card.

To see if your computer is adequate, try this WebGL1 test or Angel's examples.

Misc other computing:
 

For some homeworks, you might need to run other computer programs. Generally I'll let you choose how to solve a given problem, i.e., what SW and OS to use.

6   LMS

RPI LMS will be used only for you to submit homeworks and for us to distribute grades.

Announcements and the homeworks themselves will be available on this website.

7   Class times & places

  1. Mon & Thurs, 4-5:20pm, in Darrin 324 (lectures).
  2. Wed 6-7:30, in Sage 5101 (lab/recitation/lecture).

Wed will not always be used. Typical uses:

  1. To make up a missed class.
  2. For student presentations at the end.
  3. To review before a test.
  4. For TA meetings.

I intend no class activities outside the scheduled times, except for a final exam review, a day or two before the exam.

7.1   Lectures

You may miss classes. However

  1. You will miss iclicker points. However all the iclickers together are only 5%.
  2. You are also still responsible for knowing what happened.
  3. However, important announcements will be posted on the web.
  4. Except when some equipment fails, I post an copy of everything that I write in class.
  5. I may base exam questions on student questions in class.
  6. If you're scheduled to present something, say a term project summary, then you can't miss that.

You may use computers etc in class if you don't disturb others.

I welcome short questions, if the answers are also short.

8   Assessment measures, i.e., grades

You are welcome to put copies of exams and homeworks in test banks, etc, if they are free to access. However since I put everything online, it's redundant.

8.1   Midterm exam

  1. There will be a midterm exam in class on Thurs Oct 12, except for force majeure. (That means an unexpected big event, such as RPI being closed that day.)
  2. If you have special needs, give me the memo by the week before, so that I can schedule someone to proctor you.
  3. The Wed Oct 11 class will be a review.
  4. The exam may contain some recycled homework questions.
  5. Here are several old 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 F2016.
    2. Midterm F2014, Midterm F2014 Solution
    3. Midterm F2013, Midterm F2013 Solution
    4. 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. I'll discuss other answers in the review, or you may figure out answers on your own.

  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. As this chart shows, there is no correlation between the time taken to write the exam and the resulting grade.

    ../../images/ComputerGraphicsFall2007-midterm-grade-order.png

8.2   Homeworks

There will be a homework approximately every week. You are encouraged to do the homework in teams of 2, and submit one solution per team, on LMS, in any reasonable format. The other term member should submit only a note listing the team and saying who submitted the solution.

"Reasonable" means a format that the TAs and I can read. A scan of neat handwriting is acceptable. I might type material with a static CMS like nikola or blogging tool, sketch figures with xournal or draw them with inkscape, and do the math with mathjax. Your preferences are probably different.

8.3   Term project

  1. For the latter part of the course, most of your homework time will be spent on a term project.
  2. The project must be written in WebGL.
  3. You will implement, demonstrate, and document something at least vaguely related to Computer Graphics. Here are some ideas:
    1. A tutorial program to demo some idea in this course, such as quaternions, which I might use in future years.
    2. A 3D game.
    3. A psychophysics experiment to test how well users can match colors.
    4. A physical simulation of 3 body orbits.
    5. A 3D fractal or julia set generator.
    6. An L-systems generator for random plants (as in botany).
    7. Something in stereo using Google Cardboard.
  4. You are encouraged do it in teams of up to 3 people. A team of 3 people would be expected to do twice as much work as 1 person.
  5. You may combine this with work for another course, provided that both courses know about this and agree. I always agree.
  6. You may build on existing work, either your own or others'. You have to say what's new, and have the right to use the other work. E.g., using any GPLed code or any code on my website is automatically allowable (because of my Creative Commons licence).
  7. You will produce a 3 minute video of your project to show in class, and then answer questions for one minute. You will send your video to the TA a few days in advance; he will show the video.
  8. You may demo it to the TA in one of the last few labs. A good demo will help; a bad demo hurt.
  9. Submit stuff on RPILMS as a tarball or zipfile containing any reasonable format of files or links to files. Each team should make only one substantive submission. The other term members should submit only a note listing the team and saying who made the real submission.
  10. For the video showing in class, there will be a signup sheet; sign up early to get your first choice.
Some important dates
When What
Oct 19 9am term project title - team - 100 word summary
Nov 2 brief progress report.
Nov 16 brief progress report.
Dec 7 term project videos due to TA
Dec 11 13 term project videos shown to class.
Dec 13 term project due
Dec 13 for ECSE 6964-01: extra research paper due

8.3.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: Pnpoly.

According to Big Blues, when Bill Gates was collaborating with 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.

  1. Some winners of The International Obfuscated C Code Contest (IOCCC) implement graphics projects in amazingly short programs. Note the beautiful formatting of many programs.
    1. 28 line ray-tracing program.
    2. 63 line interactive color auto racing program.
    3. 60 line interactive flight simulator.
    4. 8 line flying spheres program. However its graphics is pretty primitive.
    5. 73 line missile command game.
    6. 72 line Othello game, which beats me.
    7. 31 line 1st person maze walker, with perspective display.
    8. 115 line interactive fractal program, that puts up 2 X windows.

8.3.2   Deliverables

  1. An implementation showing
    1. interaction and
    2. 3D graphics.
  2. A video showing it running.
  3. A user guide showing how to use it.
  4. An implementation manual showing major design decisions.
  5. A class presentation of the video followed by 1 minute of questions.
Grading
Video  
project clearly described 10
good use of video or graphics 10
neat and professional 10
Project itself  
Graphics programming with good coding style 10
Use of interactivity or 3D 10
A nontrivial amount of it works (and that is shown) 10
Unusually creative 10
Writeup  
describes key design decisions 10
good examples 10
neat and professional 10
Total 100

A 10-minute demonstration to the TA is optional. If you do, she will give me a modifier of up to 10 points either way. I.e., a good demo will help, a bad one hurt.

8.4   Final exam

There will be a final exam on a date set by the Registrar. You may bring in two 2-sided 8.5"x11" sheets of paper with notes. You may not share bthe material with each other during the exam. No collaboration or communication (except with the staff) is allowed. The final exam will contain material from the whole course, but more from the last half. (new)

  1. Final exam F2014, Final exam F2014 solution,
  2. Final exam F2013, Final exam F2013 solution,
  3. Final exam F2012, Final exam F2012 solution,

The required final exam might be as late as Dec 22. Do not make travel plans that conflict with the exam. E.g., do not buy airplane tickets and then wait until the last minute to tell me.

8.5   ECSE 6964-01 Research paper

For ECSE 6964-01 students: In addition to everything else, a 5-page research paper, formatted as for an conference on a topic related to computer graphics. LaTeX is preferable as it is the standard for these conferences.

Note that 5 formatted pages contain more words than you might realize.

This will be weighted into the other components: this paper 1/3, everything else 2/3.

8.6   Iclickers

Iclicker questions will be posed in most classes. The questions are intended to be easy. Please bring your iclickers.

8.7   Correcting the Prof's errors

Occasionally I make mistakes, either in class or on the web site. The first person to correct each nontrival error will receive an extra point on his/her grade. One person may accumulate several such bonus points.

8.8   Extra bonuses

Constructive participation in class, and taking advantage of office hours may make a difference in marginal cases.

8.9   Weights and cutoffs

Relative weights of the different grade components
Component Weight
iClicker questions 5%
All the homeworks together 23%
Midterm exam 24%
Term project 24%
Final exam 24%

Even if the homeworks be out of different numbers of points, they will be normalized so that each homework has the same weight, except that the lowest homework will be dropped, as described below.

Grade cutoffs:
Percentage grade Letter grade
>=95.0% A
>=90.0% A-
>=85.0% B+
>=80.0% B
>=75.0% B-
>=70.0% C+
>=65.0% C
>=60.0% C-
>=55.0% D+
>=50.0% D
>=0% F

However, if that causes the class average to be lower than the prof and TA feel that the class deserves, based on how hard students appeared to work, then the criteria will be eased.

8.10   Missing or late work

  1. We will drop the lowest homework grade. That will handle excused absences, unexcused absences, dying relatives, illnesses, team trips, and other problems.
  2. Late homeworks will not be accepted.
  3. If you miss the midterm because of an excused absence, we will use your final exam grade also as your midterm grade.
  4. If you miss the final exam because of an excused absence, you may demonstrate your knowledge of the 2nd half of the course at an individual oral makeup exam.
  5. If your term project is late, you will be offered an incomplete and the project will be graded in Jan 2018.

8.11   Grade distribution & verification

  1. We'll post homework grading comments on LMS. We'll return graded midterm exams in class.
  2. If you disagree with a grade, then please
    1. report it within one week,
    2. in writing,
    3. emailed to the TA, with a copy to the prof.
  3. From time to time, we'll post your grades to LMS. Please report any missing grades within one week to the TA, with a copy to the prof.
  4. It is not allowed to wait until the end of the semester, and then go back 4 months to try to find extra points.
  5. We maintain standards (and the value of your diploma) by giving the grades that are earned, not the grades that are desired. Nevertheless, this course's average grade is competitive with other courses.
  6. Appeal first to the TA, then to the prof, to another prof acting as mediator if you wish, and then to the ECSE Head.
  7. Please state your objection in writing.

8.12   Mid-semester assessment

After the midterm, and before the drop date (Oct 21, 2016), we will compute an estimate of your performance to date.

8.13   Early warning system (EWS)

As required by the Provost, we may post notes about you to EWS, for example, if you're having trouble doing homeworks on time, or miss an exam. E.g., if you tell me that you had to miss a class because of family problems, then I may forward that information to the Dean of Students office.

9   Academic integrity

  1. See the Student Handbook for the general policy. The summary is that students and faculty have to trust each other. After you graduate, your most important possession will be your reputation.

Specifics for this course are as follows.

  1. You may collaborate on homeworks, but each team of 1 or 2 people must write up the solution separately (one writeup per team) using their own words. We willingly give hints to anyone who asks.
  2. The penalty for two teams handing in identical work is a zero for both.
  3. You may collaborate in teams of up to 3 people for the term project.
  4. You may get help from anyone for the term project. You may build on a previous project, either your own or someone else's. However you must describe and acknowledge any other work you use, and have the other person's permission, which may be implicit. E.g., my web site gives a blanket permission to use it for nonprofit research or teaching. You must add something creative to the previous work. You must write up the project on your own.
  5. Writing assistance from the Writing Center and similar sources in allowed, if you acknowledge it.
  6. The penalty for plagiarism is a zero grade.
  7. You must not communicate with other people or machines, exchange notes, or use electronic aids like computers and PDAs during exams.
  8. The penalty is a zero grade on the exam.
  9. Cheating will be reported to the Dean of Students Office.

11   Student feedback

Since it's my desire to give you the best possible course in a topic I enjoy teaching, I welcome feedback during (and after) the semester. You may tell me or write me or the TAs, or contact a third party, such as Prof Mike Wozny, the ECSE Dept head.