Intro Graphics Assignment 1
OpenGL Warmup
Due: September 1, 2005
Overview
This assignment will be a gentle introduction to graphics programming. You will use some very basic features of the OpenGL API, as well as some simple interaction to control what is being drawn on the screen.
Your application will draw a single square in the center of a window, and the user should be able to reposition, resize, and rotate this square. Also, you should be able to toggle the look of the square.
Required Features
Getting Started
To help you get started, and to help avoid some of the pain of setting up a window, we have provided some skeleton code and a sample solution. Building the skeleton code will require you to have OpenGL and GLUT on your system. You should already have OpenGL; GLUT is available for a variety of operating systems in binary and source distributions, just search google.
You will also need to download the DevIL libraries from SourceForge. These libraries will be used in future assignments as well.
To get started, open the square.cpp file and look for the empty Square methods at the bottom of the file. The best way to begin is to print out debugging messages in each of these methods, and interact with the blank window, so you can figure out when each is called and what their arguments are.
You can download the skeleton code here.
Using the solution
To move the square, click and drag in its interior.
To scale it, click and drag one of its edges. To rotate it, click and drag one of its corners.To toggle the appearance of the square, press 't'.
To quit the application, press ESCAPE.
Sample solutions (get the texture bitmap here):
Extra Credit
Up to 20 points of extra credit will be awarded for extensions to the base assignment that we think are novel and interesting. To apply for extra credit, write a one-paragraph description of what you did above and beyond the call of duty. Here are a few suggestions:
- Multiple squares, allowing for adding and deleting objects, as well as changing the stacking order
- Animated squares
- N-sided polygons
- Icons to show the "grab" areas for reshaping the objects
- "Snap to grid" type editing
Submission
Write a web page describing what you did, including your entry for the art contest. For this assignment, no art contest credit will be given for a submission consisting of a picture of a single square. Either modify the main skeleton to draw many squares in an interesting way, or use your extra credit work to create something. Screenshots of a single square in an "interesting" position are not interesting.
Your web page should contain a link to a .zip file that contains ALL of the source code that your TA will need to build your assignment. It is your responsibility to make sure that the zip file is complete. We are not going to fix compile errors or fill in missing pieces of assignments.
Please e-mail a link to your submission to the TA. Never, NEVER e-mail the TA anything except a URL when submitting. In particular, do NOT e-mail your .zip file or any images as attachments.