CSCE 4813 - Homework 5
Due Date - 04/15/2013 at 11:59 PM

1. Problem Statement:

The goal of this assignment is to create some great looking graphics images using texture mapping. Students have two choices they can choose from:

  • Create an image of earth from space using a sphere model and a 2D composite image of the earth from space. Once you have this going, create a second smaller sphere to represent the moon or mars, and use the moon or mars texture on this model. Your user interface should allow the viewer to rotate, translate, and scale the geometric models so the user can see earth/moon/mars from any view point.

  • Create a model of a maze with a series of fixed-width rectangular hallways with a simple branching pattern. Your hallways should have either a brick or stone texture map, and your floors should have a tile or gravel texture map. You should not put a roof or ceiling on your maze so it will be easier to see from above. Your user interface should allow the user to rotate, translate, and scale the model so the user can visually explore the maze.

    A collection of jpeg texture map images will be provided in the src/textures directory. Students are also welcome to search for their own texture images if they wish.

    2. Design:

    The first task you must undertake is to design and implement the geometric models for the image you choose to create. If you are doing planets, see the object3.cpp and object4.cpp code for a simple sphere model. If you are doing a maze, you might want to look at building2.cpp for sample wall models. It is probably a good idea to display your model using line loops to verify correctness is before performing texture mapping.

    The src directory has three sample programs that make use of texture maps: texture.cpp, texture2.cpp, and texture3.cpp. The first two make use of synthetic textures and the third reads jpeg images to initialize the texture map. You are encouraged to read all three to see how OpenGL texture maps work.

    3. Implementation:

    You can implement this program using either a bottom-up approach or a top-down approach. If you go for a bottom-up approach, start by creating basic methods and classes, and test theses methods using a simple main program that calls each method. When this is working, you can create the main program that uses these methods to solve the problem above.

    If you go for a top-down approach, start by creating your main program that reads user input, and calls empty methods to pretend to solve the problem. Then add in the code for these methods one at a time. This way, you will get an idea of how the whole program will work before you dive into the details of implementing each method and class.

    Regardless of which technique you choose to use, you should develop your code incrementally adding code, compiling, debugging, a little bit at a time. This way, you always have a program that "does something" even if it is not complete.

    4. Testing:

    Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. Try your program on 2-3 input documents, and save your testing output in text files for submission on the program due date.

    5. Documentation:

    When you have completed your C++ program, write a short report (less than one page long) describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Are there any known problems? Save this report in a separate text file to be submitted electronically.

    6. Project Submission:

    In this class, we will be using electronic project submission to make sure that all students hand their programming projects and labs on time, and to perform automatic analysis of all programs that are submitted. When you have completed the tasks above go to the class web site to "submit" your documentation, C++ program, and testing files.

    The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit (50% off if less than 24 hours late, no credit if more than 24 hours late), so hand in your best effort on the due date.