CS 559: Computer
Graphics |
||||||
|
Computer Graphics Programming AssignmentsUPDATE 10/21/01 - You are not required to turn in Programs 3 or 4! If you turn in a working Project 2, this will count as your Programs 3 and 4 since it is a superset of their functionality. Over the course of the semester there will be 3 or 4 programming assignments, in addition to the projects. The purpose of these assignments is to give you some practice with the tools that you need to use to make your projects, not really to teach you about graphics. Also, we want to make sure you get used to the mechanisms for turning in projects. The programs count for a minuscule part of your grade. Such a small amount, that we may not look at them too closely in grading, nor will will accept late assignments. If you don't hand something in, you get no credit. The assignments are open ended. You might choose to do something very minimal, or you might try to show off how clever and creative you are. We will try to notice things that are cool, although we will not reward them with better grades. For some programs, we will reward particularly amazing programs with a small prize. Because you must explain to us what your program does, we should be able to know if its particularly noteworthy. For each assignment, you must turn in:
You must NOT include any binary files (executables, object files, debugger information, ...). We have limited disk space, so please follow this rule. You will turn in your files by copying them to a handin directory that we will specify. The assignments themselves are very minimal. In fact, for most cases, you could just take the sample programs we give you, change some of the comments, add a readme, and turn that in. However, doing this misses the point: in order to complete the projects, you will need the skills checked by these assignments. Handin DirectoriesYour handin directory will be in Because of space issues, it is important that you do not put any binary executable files into this directory (sometimes, we might ask you to put in a picture or two). Do not use this directory as your "working" directory. You should only place files into this directory when your program is complete. Programming Assisngment 1: Programming WarmupDue September 13th, 5:00 pm.The goal of this assignment is to make sure you can write interactive C++ programs under windows. Your task is to write a program that shows that you know how to write programs in C++ under windows using the fltk (or some other) library. (note: if you want to use another programming language and/or windowing library, read this page first). Your program should (at least) put up a window, respond to some user input, and do something in response to the mouse. We really don't care what your program does, as long as in the process of writing it you figure enough about the programming tools so that next week when we ask you to write a program to do something real, you've already figured out the basics (like how to run the compiler, how to configure the compiler to use fltk, how to put up a window, how to respond to the mouse, ...) We will even post some sample programs (coming real soon - check back here) so you can see how we do it. We will generate the directories based on the account info given to us by the registrar and CS lab staff. We will not make the accounts until Monday 9/11. If you look in the p:/course/cs559-gleicher/handin/Assignment1 directory and don't see a directory for yourself, send email to the TA. Note: there will may be a delay between your request and when he can make the directory for you, so please ask before Tuesday. Do not work in the handin directory. Copy your files there once the program is working. (there won't be enough disk space for everyone to put all of their working files in the handin directory). You should only copy the following files into the directory:
In short, we need all the files necesary to build your program (and a readme file). We do not want the executable, the debugging information, the .obj files, ... Also, you need to configure things so they will compile in the CS environment. If you build your programs at home or somewhere besides a CS machine, you will probably need to change your project settings. How this assignment will be graded: This assignment is different from most others since what we care about is that you figure enough out about how to program with C++, NT and fltk that you'll be ready to do a real programming assignment when we give it to you next week. Therefore, we will look at your program, make sure its correctly documented (so make sure the readme file explain what the program does), and probably look at your code to give you an idea if your coding meets our level of expectation. We probably won't check to see if your program actually works. We will care if you follow directions. So I highly recommend you turn in the right files before the due date. The idea is that if you blow off this assignment now, you'll have problems later (like next week) when we ask you to actually write real programs. So, if you were lazy, you could copy one of the example programs, add comments giving proper attribution (remember the academic conduct rules!), add a readme file, and get full credit for the assignment. However, you may regret it (as soon as next week) when you're trying to figure out the basics of writing a program in C++ on NT with fltk, AND the graphics stuff you need to do. On the other hand, if you're inspired and right some really cool program (be sure to describe it in your readme file), we may try it out to see how great it is. Programming Assignment 2: Reading and Writing ImagesDue September 20, 5:00 pm.The goal of this assignment is to make sure that everyone can write a program under Windows NT that can read and write TGA images.For projects in this class, you will be required to read and write images in the Targa (TGA) format. While Targa is a relatively easy image format, it is still a hassle to write a good reader, so most programs use a library written by someone else. If you want to write your own Targa reader, you are welcome to. However, you must make sure it works with our test images (which we will provide). To be honest, there are much more fun programming projects. We will provide you with a very easy to use library called libtarga. You are free to use some other library, but we strongly encourage you to use this one since its easy, and we can help you with it. Your program for this assignment needs to:
One trick here: your program must take 0, 1 or 2 command line arguments. We will provide you with an example program that does this. In fact, we will provide you with a complete solution for this assignment. We don't care what your program does to the image. You can just change the value of 1 pixel. Or you can do something cool to the image. Be sure to describe what you do to the image in your readme file. The handin instructions are identical to those for Assignment 1. (except the directory will be assignment 2, and we will make the directories on 9/19). Programming Assignment 3: OpenGLDue October 18, 2001, 5pmThe purpose of this assignment is to give you practice with the basics of working with the OpenGL graphics library. You will need to use OpenGL for the next programming projects. In this assignment, we are asking you to use OpenGL to do 2D drawing. So, if you're ambitious and do 3D drawing, that's OK, but we suggest you start with the easier 2D . Also, don't use fltk or other 2D drawing things. We really want you to use the 2D stuff in GL. (which is actually the same as the 3D stuff, but that's another story). You must write a program that:
Note: unlike previous practice assignments, we are not giving you an example solution beforehand. However, the sample code and the GL Survival Kit should get you most of the way there. Figuring out how to convert from mouse coordinates to positions in your window will force you to think about the transformations that GL is performing. As in the previous assignments, you are welcome to do more interesting programs. Make sure that you explain what your program does in the README file. Programming Assignment 4: 3D and OpenGLDue October 25, 2001, 5pmThe purpose of this assignment is to give you the opportunity to get familiar with OpenGL. Everything that you do will be directly relevant to the next project. As with the other programming assignments, the requirements are minimal. Your program must:
To encourage you to experiment with better interfaces, we will provide you with some example code that implements a basic 3D user interface using a "virtual trackball." To be honest, the simple one I give you has some problems. You might want to look around on the web for better ones. (I suggest looking for something called an "arcball" for example). Or you can wait for Mark to give you his. (which he will). Mark will provide a complete solution to this assignment. Be warned: project 2 is coming up, and this assignment is a good running head-start for it. Be sure to understand this assignment! We will explain most of the graphics technology (e.g. what double-buffering and z-buffering are) in class.
|
|