CS 424: Computer Graphics, Fall 2017
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 Lab 5. The completed midterm project will be due on October 30 and will count for 10% of your final grade for the course. Lab 8 On October 19 will also be used for working on the midterm project.

The Midterm Project

You are strongly 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 Lab 5 period 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 materials, textures, lights, and cameras. Note that you can take some ideas from my simple 2D scene graph API, but you should not just duplicate it in 3D.

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 plain 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. It would be nice to use the Javadoc tool to create actual API documentation web pages for the project. (You can generate Javadoc documentation in Eclipse.)

If you do decide to work in C++ or C, 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.