Computer Graphics I

4003-570-01 / 4005-761-01 (Fall 2007)

Assignment #1: 2D Drawing in OpenGL



Date posted: September 12, 2007
Date due: September 26, 2007

Slides presented in class about  this assignment available here.


Purpose

The purpose of this programming assignment is to provide

Task

You are to write an application program using the  OpenGL/GLUT calls:

Effect OpenGL commands needed
OpenGl Setup glutInit, glutInitDisplayMode, glutInitWindowSize, glutInitWindowPosition, glutCreateWindow, glutMainLoop, glutDisplayFunc, glClearColor, glFlush or glSwapBuffers
Using different primitives (lines, line-strip, line-loop, triangles, triangle-strip, triangle-fan, rectangle, quads, quad-strip, polygon) glBegin/glEnd, glVertex, glRect
Using different attributes (line style, line width, fill style, color) glLineStiple, glLineWidth, glPolygonStiple, glColor, glEnable
Moving from one screen to the next glutMouseFunc, glutPostRedisplay

Output Format:

What you "draw" is up to you, but I would anticipate several different screens that I can move between by pressing a mouse button, i.e., your image(s) should stay visible on the screen until either mouse button is pressed and released. Your image(s) should also be interesting!

NOTES:

  1. You are expected to use EACH of the routines mentioned above.
  2. "Best Of" selections from previous quarters are available for your viewing from the page http://www.cs.rit.edu/~ncs/Courses/570.shtml. You'll need to copy the executable into your Unix account to run them. I will select the "best" of your submittals to add to the web page and for use in future demonstrations.
A sample "Hello World" type application for OpenGL can be found here.   Please feel free to use this as a starting point.

What to submit

Please submit all files necessary to build and run your program.  This includes source files, header files, project files, and Makefiles.  In addition, the submission should include a README that indicates the platform on which your assignment is built, as well as notes on how to build and run your project.

Platform specific OpenGL libraries should exist on each platform that supports OpenGL.   (In most cases, these libraries are supplied by the manufacturer of the graphics card present on your system).    If you are planning on using the Suns for your project,  please make use of the following
header.mak file to see the proper libraries that need to be linked and the locations of those libraries.  (Note that if you use makemake or gmakemake, the contents of this file will be incorporated into the Makefile produced).

NOTE: OpenGL and GLUT are not installed correctly on the Sparc Based systems (in ICL4)....Please use ICL1-3 (or Grad Lab) if you plan on using the Suns!

All submission should be made using mycourses.   Look for the folder named "Assignment 1" in the dropbox area.

Assessment

Your overall programming assignment grade will be based on the following: demonstration of the use of the required routines, the complexity (how interesting) of graphical output, internal documentation, and program design. 

last updated 09/11/07