CS 381
>
Assignment 2
CS 381, Fall 2003
Assignment 2
General Information
- E-mail answers to the questions and C++ source for the program described below to me at
ffggc@uaf.edu,
using the subject
"GA2".
(If you wish to discuss the assignment with
me via e-mail, use a different subject.)
- If possible, please send your source as an attachment to your e-mail,
rather than as part of the body text.
- Send source only! No executables, project/workspace files, etc.
- Be sure to include your name in your e-mail.
- Due: Thursday, September 18 (any time).
- Worth: 25 points.
Homework Policies
See the
Homework Policies handout.
Questions (5 pts)
- The glBegin-style primitives all draw
points, lines, or polygons.
But OpenGL has other primitives.
What sorts of things do they draw?
- Why is it generally a good idea to post a redisplay event
(in GLUT, by calling glutPostRedisplay)
when the window contents need updating,
rather than calling the display function directly?
- List two issues that come up in 3-D CG
that do not come up (or are much simpler to deal with) in 2-D CG.
Program (20 pts)
Write a C++ program using OpenGL/GLUT
that draws something.
- Your program must use all ten
of the glBegin-style OpenGL primitives.
- Your program must respond in some meaningful way to the keyboard.
- Do not make me work hard to figure out how your program is used;
put some simple documentation on the screen (in the text window, for example).
Suggestions for Full Credit
Doing any one of the following is sufficient—but do them all if you want!
- Add a more advanced OpenGL feature to your program.
For example, try learning about and implementing one of the following.
- line stipples
- polygon stipples
- polygon mode
- display lists (“call lists”)
- Have your program’s display change automatically,
without requiring user input.
- Draw text in your program’s (graphics) window.
- Have your program respond to the mouse in some interesting way.
Note
Particularly well-done programs may be demonstrated in class.
CS 381, Fall 2003: Assignment 2 /
Last update: 15 Sep 2003 /
Glenn G. Chappell /
ffggc@uaf.edu