INTERACTIVE COMPUTER GRAPHICS
- REQUIRED TEXTS
Angel, Edward. Interactive Computer Graphics, 4th Edition- TIME AND PLACE
- TR 9:25-10:45 AM, Late Start Time TR 10:55-11:55
- RBH 223
- INSTRUCTOR
- Susan Reiser
- Office: RBH 219
- Office Hours: 10:45-11:45 TR and 8:30-9:30 MW
- Office Phone: 232-5166
- E-Mail: reiser@cs.unca.edu
- BAD WEATHER POLICY
DESCRIPTION This class will introduce programming techniques for the interactive display of two and three dimensional objects. The following topics will be covered. Other topics may be added if time permits.
- Viewing
- Transformations: Rotation, Translation, and Scaling
- Hidden Line and Hidden Surface Removal
- Animation
- Shading
- Visualization
- Image Processing
INFORMATION This class is a programming class. Late programs will not be accepted. Programs that do not produce graphic output (even if they compile) will not receive a grade above a "D". Programs that do not compile will automatically receive an "F". If you know you will be absent the date a program is due, please make arrangements to turn in your program prior to the class. Please come see me during office hours if you need help on your programming assignment, but in an effort to discourage procrastination, I will not help with a program, the day before or the day an assignment is due.
Students may be asked to present their programming projects during class on the day that they are due. Have your project ready at the beginning of class. Email me your source code as an attachment via email.
There will not be makeup exams. Please do not ask me to make an exception unless it is an emergency, and you have the necessary documentation for an excused absence.
Plus and minus grades will be used for your final grades.
WHICH OPERATING SYSTEM SHOULD YOU USE FOR YOUR PROGRAMS? It doesn't matter whether you use Windows, UNIX, Linux or OSX. All support OpenGL (well... on Linux you will need to download Mesa). You will need to install GLUT on all platforms.
TEAMWORK ON PROGRAMS It is acceptable to work with other students in the analysis, design, and debugging phases of your programming assignments. However, unless it is a team project, do not write code as a team. Do not copy your code from or for another student. Do not copy the code you hand in from a book or the WWW. Please list the students with whom you collaborated, and the type of help you gave or received in a comment at the top of your program. Try not collaborate with the same person(s) on successive assignments.
For any other assignments, quizzes and tests you must do your own work.
Course Schedule
- 01/15-17/08
- Tuesday: Intro to the course, Why C?, Semester Plan
- Intro to C and pointers. (1/17/08)
- Reading Homework - Chapter 1 (1/15/08), Chapter 2 (1/17/08)
- Sign up for presentation and paper topic.
- 01/22-24/08
- Chapter 1 - Graphics Systems and Models (1/22/08)
- Chapter 2 - Graphics Programming
- Project 1 assigned - Part 1 Due 01/31/08
- Reading Homework - Read Chapter 3
- Negatives made by the pinhole camera
shown in class: image1, image2 and image3
- 01/29-31/08
- Chapter 3 - Input and Interaction
- Reading Homework - Read Chapter 4 (This is the most critical chapter
for this class. If you need help with matrices, read the Appendices.)
- 02/05-07/08
- Read Chapter 4
- Study for Test 1
- 02/12-14/08
- Test 1 next week- Chapters 1 - 4
- Chapter 4 - Geometric Objects and Transformations
- Reading Homework - Read Chapter 5
- 02/19-21/08
- Test 1 02/19 Review- chapters 1-4
- Chapter 5 - Viewing
- Reading Homework - Read Chapter 6
- 02/26-28/08
- Chapter 6 - Lighting
- Project 1 scene and interaction due 02/26
- Reading Homework - Read Chapter 6
- Demo of Project 1 due 03/10
- 03/04-06/08
- Enjoy your Spring Break!
- 03/11-13/08
- Reading Homework - Chapter 8
- Work Day - 03/13
- Chapter 8 - Discrete Techniques
- 03/18-20/08
- Project 1 Due 3/25
- Chapter 6 - Lighting
- Chapter 8 - Discrete Techniques, Mapping
- Reading Homework - Chapter 10
- 03/25-27/08
- Chapter 10 - Modeling
- In class lab 03/27
- Study for Test 2 on 03/26
- 04/01-03/08
- 04/01 - Test 2 - Chapters 5-8 and 10
- Read Chapter 7
- Chapter 7 - From Vertices to Fragments
- Reading Homework - Read Chapter 9
- 04/08-10/08
- Chapter 9 - Programmable Shaders
- Program 2a assigned - due 04/15
- Read Principles
of Traditional Animation Applied to 3D Computer Animation,
John Lasseter, Computer Graphics, Volume
21, Number 4, July 1987.
- History of Computer Graphics
- History of Computer Graphics
- 04/15-17/08
- Spring Symposium - no class 4/15.
- Animation Principles
- Program 2b assigned - due 04/24
- Homework: Study for Quiz 3 on Chapters 7, 9, 10 and Animation
- 04/22-24/08
- Quiz 3 on Chapters 7 and animation (04/22/08)
- Scientific Visualization
- Final Program 2c assigned - due 05/07 except for graduating seniors
- 04/29/08
- Last Day of Classes - Project 2c due for seniors
- CNC Milling
- 05/08/08 - Thursday, 8:00-10:30 AM
- Final Program due.
Grading
| Description | Number | Individual Points | Net Points | |
|---|---|---|---|---|
| Tests | 2.5 | 25 | 62.5 | |
| Project 1 | Documentation - 10 pts Program 1: Scene - 5 pts Program 2: Input (menu, kbd) - 5 pts Program 3: Transformations - 5 pts |
1 | 25 | 25 |
| Project 2 | 30 points (divided into three equally weighted programs) |
1 | 30 | 30 |
| Attendance/Participation | n/a | 5 | ||
| Paper (10 pts) + Presentation (5 pts) | 1 | 15 | 15 | |
| Totals | 137.5 points | |||
Resources
Sample Source Code
- sailboat (sailboat used in class 01/31)
- Fill Pattern Example: picture3.c
- picture3spin.c
- Line Pattern Example: lines.c
- Program 3 Example: glutdino.c
- Program 3 Example: glutclappingdino.c
- Light Lab: lightlab.c
- Alpha: alpha.c
- Image Display (.ppm): ppmdisplay.c, sample image: robot.ppm
- Checkers map: checkers.c
Misc.
- OpenGL.org
- OpenGL Commands
- Graphics Library Utility Toolkit (GLUT)
- Nate Robin's Tutorials
- Internship Possibilities
- GLUT with .net used with permission from Professor Williams at Texas A&M
- Development environment for Windows - not .net
- ImageMagick
- Animation World Network
- SIGGRAPH
- Sample programs from Prof. Angel
- Sample texture programs
Visual Studio 2008
- Download the dll and necessary glut files
- Download the opengl files
- Move the .dll files to C:\Windows\System32\ directory. Do not overwrite the files if they already exist - this is particularly important for opengl.dl.
- Move the .h files to C:\Program Files\Microsoft Visual Studio\VC\include\GL\ directory. Note: you will have to create the GL directory.
- Move the .lib files to C:\Program Files\Microsoft Visual Studio\VC\lib\ directory
- Select Resources View, Linker, Command Line. In the additional options box, add opengl32.lib glut32.lib glu32.lib. Select apply and ok.
- Remove the include line #include <stdlib.h> from the source file.
- Compile and run your program.
.NET (not needed for .NET in RBH 004)
- Same as above but place the files in the C:\Program Files\Microsoft Visual Studio .NET\Vc7\* directories.
- Select Resources View, configuration, C/C++, Precompiled Headers, Create/Use Precompiled Header, Not Using Precompiled Headers.
- Select Resources View, Linker, Command Line. In the additional options box, add opengl32.lib glut32.lib glu32.lib. Select apply and ok.
- Comment out the following preprocessor directive: #include <stdlib.h>
- Select Resources View, Linker, System, SubSystem. Make sure Windows (/SUBSYSTEM:WINDOWS) is selected.
- Select Resources View, Linker, Advanced. Set Entry Point to mainCRTStartup
- As an alternative to steps 5&6, you can include the following
one line preprocessor directive at the top of your code. It does
steps 5&6 for you.
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
dev-c++ on PC
- Download and install Dev-C++
- Get the glut files (versions specific to Dev-C++) from http://www.mcs.sdsmt.edu/csc433/GLUT/MinGW/. Move glut.h into the Dev-cpp/include/GL directory. Move libglut32.a into the Dev-cpp/lib directory.
- Under Project->Project Options, there is a Parameters tab. Under this tab, in the Linker text box, add the following IN THIS ORDER using the "add library or object" button: libopengl32.a, libglu32.a, and libglut32.a (*not* libglu.a and libglut.a !)
Xcode on Mac OS X
- Start Xcode.
- Create a New Project - Select File and New Project... In the dialog box that follows, select Cocoa Application under the heading Application. Enter a project name of your choice and save it in the documents folder. Xcode will now display your project.
- Select main.m and MainMenu.nib (hold down command/apple key to multiple select, or do each one individually). Hit the delete key on your keyboard, or select Edit / Delete. Xcode will ask you,
The references to be deleted refer to files on your disk. Do you wish to delete only the references and not the related files?SelectDelete References & Filesbecause these will no longer be needed. - Xcode
also added some library references to your project, which are
unnecessary. Select AppKit.framework, CoreData.framework, and
Foundation.framework. Delete them with the delete key, or select Edit / Delete. DO NOT DELETE REFERENCED FILES. Xcode will ask you,
The references to be deleted refer to files on your disk. Do you wish to delete only the references and not the related files?Make sure you selectDelete References. That should be the default. - Add your main function which may or may not be contained in a file named main.c[pp] to the project. Select the project name in the leftmost window under Groups and Files, then Project / Add to Project.
- Add
OpenGL.framework and GLUT.framework to your Xcode project. Both
frameworks are located in /System/Library/Frameworks/. The dialog for
adding the framework to the project has a checkbox labeled
Copy items into destination group's folder (if needed). Make sure that this checkbox is UNCHECKED. - Select the icon labeled Build and Go to compile, link and execute the project.
gcc on Mac OS X
- Modify the preprocessor directive to read #include <GLUT/glut.h>
- Make sure the GLUT and OpenGL frameworks are installed. They are included with the OSX disks.
- To compile, use the following from the terminal window command line. gcc -framework OpenGL -framework GLUT -framework Foundation -o basicBoat basicBoat.c
- To execute, double click the new UNIX executable, basicBoat in the example above.
Return to Susan Reiser's home page
Last modified: May 8, 2008 7:50