CS 381 Fall 2012
Assignment 1
Assignment 1 is due at 5 p.m. Wednesday, September 12.
It is worth 20 points.
Procedures
E-mail
answers to the exercises below to
ggchappell@alaska.edu,
using the subject
“GA1”.
- Your answers should consist of a text or wordprocessor file holding
the answers to Exercise A, and the source code for Exercise B.
These should be attached to your e-mail message.
- Send only the above!
I do not want project files or executables.
I also do not want things I already have, like
glut.h.
- Be sure to include your name in your e-mail.
- I may not read your homework e-mail immediately.
If you wish to discuss the assignment (or anything else)
with me, send me a separate message with a different subject line.
Exercises (20 pts total)
Exercise A — Running an OpenGL/GLUT Program
Purpose
In this exercise, you will compile and execute an OpenGL/GLUT
program, and tell me what it does.
You will need GLUT installed.
Instructions
Download, compile, and execute check_opengl.cpp.
Tell me what it does.
Be specific (colors, shapes, etc.).
Exercise B — Writing an OpenGL/GLUT Program
Purpose
In this exercise, you will write an OpenGL program
that does simple interaction and animation.
This is an open-ended exercise;
exactly what your program does is entirely up to you.
Instructions
Write an OpenGL program that meets the following requirements.
- The program must be in standard C or C++ and produce graphical output using OpenGL.
- The program must be GLUT-based, following the
rules for callbacks
discussed in class (9/4).
- The program must use all ten OpenGL general geometry primitives.
- You may include other OpenGL primitives, if you wish.
- The program must somehow respond to user actions—for example, keypresses.
This response must involve changing the graphical display in some significant way.
Note
Submitted code may be demonstrated in class.
Coding Standards
First:
- Code that does not compile will not be graded.
All submitted code that is graded
will be subject to the following standards.
- Code should be neat and readable, and should follow standard conventions
concerning the use of header and source files, inclusion, etc.
- All comments in code must be correct.
- Debugging printout, or other extraneous output, should be avoided.
- Note: I am very much in favor of debugging printout.
But please disable this in the version of your code that is turned in.
- It should be clear how a program is used.
I strongly suggest putting some (short!) instructions in either the text window or the graphics window.
- Programs should not “look buggy”.
If it looks like you tried to do something and failed,
then I will be not be inclined to give you full credit.
Therefore, if your program has some non-obvious purpose that needs explanation,
then give me an explanation in either the text or graphics window.
- Programs may be based on code written by someone else.
However:
- Your submissions must still be largely your own work.
- You must give credit in the code to the author of any code
you base your work on.
- Code written by others may only be used in a way that does not
violate applicable laws and licenses.