CS 424: Computer Graphics, Fall 2015
Lab 5: Starting the Midterm Project

This week's Thursday lab period will give you a chance to start planning and working on the midterm programming project. The project is a larger and longer-term project than the sort of short exercises that we usually do in lab.

No work will be collected or graded for this lab. The completed midterm project will be due on October 30 and will count for 10% of your final grade for the course.

The Midterm Project

You are encouraged, but not required, to work with a partner on the midterm project. Ideally, you should find a partner before coming to the lab on Thursday.

The project is to design and implement a scene graph API for OpenGL 1.1. Your scene graph library will let programmers create 3D scenes by constructing a data structure that represents the content of the scene. Your API will define the classes that are used to create the data structure. In addition to the library, you should write several example programs that demonstrate its capabilities. Deciding exactly what capabilities to include is part of the project.

You can spend the period today thinking about the overall design of the API, deciding how you will coordinate with your partner (if you have one), and maybe getting started on the programming. To start, the scene graph will be mostly geometry, that is basic geometric objects and transformations. As we work through the next month of the course, we will encounter more things that might be added to the scene graph, including cameras, lights, materials, and textures. You can use the 2D API from Lab 3 as a starting point for ideas, but that was a simple 2D API, and you will not want to use exactly the same structure.

You will probably want to work in Java. If you know C++, you can consider using that. It would be difficult to do the project in C, unless you know C very well. A scene graph is a linked, hierarchical data structure containing nodes of several different kinds. In Java and C++, you can define classes to represent the different kinds of scene graph node. It is more difficult in C, where you would need to do rather technical work with pointers, structs, and memory allocation. (Still, if you are interested in knowing how it would be done in C, come in and discuss it with me.)

Assuming that you are working in Java, I suggest that you create a package to hold the classes that define the scene graph. Each class or interface should be in its own file. You should include appropriate Javadoc-style comments in the code, and you should use the Javadoc tool to create the API documentation for the project. (You can generate the Javadoc in Eclipse.)

If you do decide to work in a different programming language, we will have to discuss what would be the best structure for the code.

Design Issues

You will need to make many design decisions as you build your API. We will be discussing many of the issues in class as we work through Chapters 3 and 4. Here are some of the things that you should think about:

Note that you should not try to do everything. You are not expected to include all possible features in your API. If your design is flexible, you should be able to start with a basic set of features and add more later, according to your available time and interest.