CSCI 441 - Computer Graphics

Fall 2015 - Assignment 1 - Banners of War



|   Home |  Syllabus |  Assignments |  Leaderboard |  Schedule |  Resources   |
This assignment is due by September 2, 2015 by 11:59pm.

Word has reached your camp that there exists other heroes outside of your home in Asgard. It is too early yet to tell if these fellow travelers are friend or foe. These heroes are at least a month's march away so there is time to make preparations before the inevitable meeting takes place.

The entire village is filled with activity as you make your way through the streets. They expect you to represent them well and to defend their honor. An older woman approaches you, hands you a piece of fabric, and says:
"Please use this cloth and adorn it with our town crest. As you venture out into the world all will instantly recognize where you are from. Do not be humble either, proudly stitch your name by the crest as well."
Not wanting to insult the woman, you take the cloth and return to your shop. Immediately you begin affixing her requests to the soon to be banner. There is not much time to waste.


Part I - Display Your Banner


You quickly realize the woman gave you all the fabric she had, which is an odd size - 700 inches by 150 inches. Wanting to make the most of the materials at hand, you plan to use it all. As you unfurl the cloth, you find a note that reads:
For this assignment, create an OpenGL / GLUT program that displays your hero's name and a crest of your choosing to represent your homeworld. Create a window that matches the size of the fabric you have - that is, make the window 700 pixels wide by 150 pixels tall. 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. Be sure to try out the different primitives that are available.

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() respectively. 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.
Once your banner is created, your hero will proudly display their banner on their hero page, accessible from the leaderboard. Proud of your work, your hero steps back and realizes you will need more than just a paltry flag. Your hero quickly begins looking around for any equipment that's at hand.


Part II - Create Your Website


In addition to making a banner, 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 (or .zip 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.

Inside the www/ directory, there is an images/ folder. Place any screenshots and other images into this folder.

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 <heroName>.html where <heroName> is the name of your hero. (For example, my submission would look like ElvishScout.html.)


Documentation


With this and all future assignments, you are expeced 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 what 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 / HeroName
  • 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
  • How long did this assignment take you?
  • How much did the lab help you for this assignment? 1-10 (1 - did not help at all, 10 - this was exactly the same as the lab)
  • How fun was this assignment? 1-10 (1 - discontinue this assignment, 10 - I wish I had more time to make it even better!)


Grading Rubric


Your submission will be graded according to the following rubric.

PercentageRequirement Description
15%Hero's name and crest are drawn to screen.
5%Window is sized appropriately
20%Hero's name and crest are made up of solid OpenGL primitives
(GL_TRIANGLES / _STRIP / _FAN, _QUADS / _STRIP).
10%Hero's name and crest are made up of more than one color.
15%Letters are translated, scaled, and rotated.
10%Submission includes source code, Makefile, and README.txt.
Source code is well documented.
10%Webpage named <HeroName>.html submitted and updated with screenshot from latest assignment.
15%Submission compiles and executes.


Experience Gained & Available Achievements


Assignment Attribute
Assignments +100 XP
Web Attribute
Web +100 XP
Combinatorics
Combinatorics


Submission


Please update your Makefile so it produces an executable with the name a1. When you are completed with the assignment, zip together your source code, Makefile, README.txt, and www/ folder. Name the zip file, HeroName_A1.zip. Upload this file to Blackboard.


This assignment is due by September 2, 2015 by 11:59pm.
Last Updated: 01/01/70 00:00


Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0