landscape image

Because the semester is over, many of the links on this page may no longer work.


Project 4: Simple Ray Tracer

  • Resource Package: We have put together a package of resources for Project 4, called Project4-Resources-v3.zip (updated Dec 3 with Linux executable and template raytracer program, and Dec 9 with a hopefully fixed version of the sample executable). It contains a sample executable for Windows and a number of test inputs. The sample program has a test mode, where you can specify the row and column index of your image, and it produces a dump of all the objects hit by the corresponding ray the results of all the lighting computations.

Project 3: Katamari Lite (Part II)

  • Cloth Simulation: There are a number of good tutorials on cloth simulation on the web, many of which have source code. Here are couple, which we found:
  • Resource Package: We have put together a package of resources for Project 3, called Project3-Resources-v2.zip. (Updated 11/29 with more objects and updated executable.) It contains a sample executable for Windows.
  • Image Capture: I produced an image capture of the program. The file is quite large (about 25Meg). To download the file click here.
  • Performance Tips: The project is computationally intensive. Here are a few suggestions for improving running time:
    • Run your compiler with the highest level of optimization. For Visual C++, select "Release" rather than "Debug" mode. For Unix and gcc/g++ select the highest optimizing level (e.g., "-O3")
    • There is a free program called Fraps, which can tell you how many frames per second your program is rendering.
    • Cloth simulation is computationally expensive. You can reduce the size of the cloth mesh. Apply some sort of adaptive algorithm to avoid computing cloth dynamics if the cloth is at rest. Use a bounding volume to optimize collision detection with the cloth.

Project 2: Katamari Lite (Part I)

  • Quaternion Resources:
    • A nice C++ class implementing quaternions can be found at Perone's Programming Pad. (Warning: This package seems to require inclusion of other software packages. You might consider the quaternion class in the Project-2 Resource Package below as an alternative.) Remember to acknowledge all code you download from external sources.
    • A nice description of Quaternions (along with basic equations) can be found Euclideanspace.com and Wikipedia.
  • Resource Package: We have put together a package of resources for Project 2, called Project2-Resources-v5.zip. This has been updated Oct 17 (with object-format.txt), Oct 19 (with parameters.pdf), Oct 22 (with code for vectors and quaternions) and Oct 25 (with a Unix executable). It contains an executable of our program (which is not perfect, but may give you some ideas about what the project might look like). It also has a few resources, such as:
    • skybox-clouds.bmp: A sample skybox.
    • RGBpixmap: A C++ program for reading image files and converting them into OpenGL textures.
    • objects.txt: A files spefying the objects used in our program.
    • object-format.txt: Format of the objects.txt file.
    • parameters.pdf: A description of the numeric/OpenGL parameters used in our sample program.
    • Quaternion: C++ classes Vector3D and Quaternion for Vector and Quaternion operations.
    • Project2.exe: Windows executable.
    • Project2-unix: Linux executable (This was compiled on the CSIC Linuxlab machines. Before execution, you will need to set executable file permissions, e.g., "chmod u+x Project2-unix".)

General Information

General information regarding OpenGL, which may be relevant to the projects, will be presented here.

  • OpenGL Error Checking: OpenGL does not report errors, but it is possible to query OpenGL to determine whether an error has occurred. This is done with the procedure glGetError. A simple procedure for checking errors (both in C++ and C) can be found here.
  • Animation Speed Control: Because different systems and different rendering contexts require a different amount of time to process, it is useful to have a procedure that returns the wall-clock time. This is provided by the system function ftime. A code snippet that extracts millisecond counts can be found here. (Beware: Your system's clock resolution may be lower than a millisecond. Around 20 milliseconds seems to be common on current Window systems. It may be good idea to average times over a number of refresh cycles to obtain a better estimate. If the window is resized, your estimate will likely need to be updated.)

-   CMSC 427 Home   -

Web Accessibility