CSE 40166 / 60166 - Computer Graphics

|    Home  |   Syllabus  |   Assignments  |   Schedule  |   Resources   |

Homework 1 - Initials

This assignment is due by August 30, 2012 by 11:59pm.


Part I - Draw Your Initials + CSE

For this assignment, create an OpenGL / Glut program that displays your initials and the letters CSE. Do not use any predefined fonts, instead draw each letter using a filled OpenGL polygon. Each letter should be constructed using OpenGL primitives (GL_TRIANGLES, GL_TRIANGLE_FAN, GL_QUADS, etc. Do not use GL_POLYGON) and a set of manually created vertices. The vertices can be hardcoded in the program or read from a file if you are feeling particularly fancy.

In addition, more than one color must be used when drawing the letters. The letters need to be translated, scaled, and rotated by calling glTranslatef(), glScalef(), glRotatef(). Make sure at least one letter is used in conjuction with each transformation.

It would be good practice to begin encapsulating data within subroutines and functions (for instance, have a function drawLetterC() that handles drawing the letter C and a separate function drawLetterS() that handles drawing the letter S). While a simple example right now, this will become much more important later on when we discuss model hierarchy and object oriented program design.


Like this but cooler. Maybe with outlines, or sparkles. Be creative!


Part II - Create Your Own Personal Website

Create a webpage that showcases your work. There is a template available for your website. If you wish to use it, download this .tar.gz file and extract it in your dropbox. It will create a www/ directory with the stylesheet from the course webpage, which you can use if you like. You'll be adding to it for each homework assignment, with a screenshot or screenshots of your work, a short description of the assignment, and the opportunity to talk about any neat implementation details if you so choose. The websites are a way for you to keep track of the projects you've made over the course of the semester, but you should also aim to make the descriptions accessible to people outside of the course as a way to share and showcase your coursework.

If you're not familiar with HTML, don't worry; the template shouldn't do anything crazy - a <br/> signifies a newline, the <img> tag places an image. There are plenty of tutorials available for HTML if you want to add tables, change font styles, or play with the formatting. There are some comments in the template file to help you out as well.

If you choose to use the template or your own template, be sure to name the webpage <afsid>.html where <afsid> is your afsid. (For example, my submission would look like jpaone.html.)


Part III - Questions

Briefly answer the questions below. Include your response in the README.txt file.
  1. ICG #2.10

  2. How did you handle drawing the letters 'C' and 'S' in CSE? OpenGL is great at drawing straight lines, but how can a curve best be drawn?


Documentation

With this and all future assignments, we expect you to appropriately document your code. This includes writing comments in your source code - remember that your comments should explain what a piece of code is supposed to do and why; don't just re-write the code says in plain English. Comments serve the dual purpose of explaining your code to someone unfamiliar with it and assisting in debugging. If you know what a piece of code is supposed to be doing, you can figure out where it's going awry more easily.

Proper documentation also means including a README.txt file with your submission. In your submission folder, always include a file called README.txt that lists:
  • Your Name / netID
  • Homework Number / Project Title
  • A brief, high level description of what the program is / does
  • A usage section, explaining how to run the program, which keys perform which actions, etc.
  • Instructions on compiling your code
  • Notes about bugs, implementation details, etc. if necessary


Grading Rubric

Your submission will be graded according to the following rubric:

PercentageRequirement Description
15%Initials & CSE are drawn to screen.
15%Initials & CSE are made up of solid OpenGL primitives
(GL_TRIANGLES / _STRIP / _FAN, _QUADS / _STRIP).
10%Initials & CSE are made up of more than one color.
15%Letters are translated, scaled, and rotated.
5%Questions from Part III are answered and included in the README.txt file.
10%Submission includes source code, Makefile, and README.txt.
Source code is well documented.
10%Webpage named <afsid>.html submitted and updated with screenshot from latest assignment.
20%Submission compiles and executes in the lab machine environment.


Submission

Please update your Makefile so that it produces an executable with the name hw1. When you are completed with the assignment, submit the source code, Makefile, and READEME.txt to the following directory:

/afs/nd.edu/coursefa.12/cse/cse40166.01/dropbox/<afsid>/hw1/

Similarly, title your webpage <afsid>.html (e.g. jpaone.html) and submit it to:

/afs/nd.edu/coursefa.12/cse/cse40166.01/dropbox/<afsid>/www/

Place any screenshots or other images used on the webpage in:

/afs/nd.edu/coursefa.12/cse/cse40166.01/dropbox/<afsid>/www/images/

This assignment is due by August 30, 2012 by 11:59pm.