CS 248: Introduction to Computer Graphics

Pat Hanrahan


Getting Started

Preparation

Before you try to use MOAN, you should review all class material relating to hierarchical modeling and animation:
  1. Chapter 3 of the OpenGL Programming Guide.
  2. Lectures 11 and 12 of the Course Notes.
  3. Lectures 11, 12, 13, and 16 (especially the BBOP video).
  4. Chapters 5 through 7 of Computer Graphics: Principles and Practice.
Also, you should carefully read the on-line documentation of MOAN.

Executing MOAN

You may invoke MOAN in any of the following ways:
  1. Add
    /usr/class/cs248/assignments/assignment3
    
    to your path in ~/.cshrc. Execute
    source ~/.cshrc
    
    (This only needs to be done once, not every time you log in.) Henceforth, you may execute MOAN by simply typing moan on the command-line, no matter what your current directory is.
  2. Create an alias to MOAN by adding the line
    alias moan /usr/class/cs248/assignments/assignment3/moan
    
    to ~/.cshrc. As in the previous option, execute
    source ~/.cshrc
    
    once, and henceforth use simply moan to invoke MOAN.
  3. Copy the MOAN executable to the /usr/tmp directory of your local raptor using
    cp /usr/class/cs248/assignments/assignment3/moan /usr/tmp/moan
    
    and invoke it using
    /usr/tmp/moan
    
    or by defining an alias as in the previous option. This approach may improve performance if you use MOAN repeatedly, as disk accesses will be local.

    Remember to delete your local copy when done.

Reminders:

Skeleton for cubic interpolator

Your may compose your cubic keyframe interpolator either in C or in C++. Please follow the appropriate instructions below: Then, type
make
on the command line, and your very own version of MOAN will appear in your current directory (please disregard the warnings produced). This version differs from ours only in that it does not perform cubic keyframe interpolation (not yet, at least).

Read

/usr/class/cs248/assignments/assignment3/interpolate.h
which describes the interface to and functionality of the code segment you have to write; you do not need to copy this file locally. It might help you to go over our implementation of the linear keyframe interpolator, in order to fully understand the role of each argument passed to your function.

Finally, once your code is fully debugged, you may want to edit your Makefile and deactivate the -g compiler option, while enabling the -O2 compiler option and the -s linker option. Thus, your version of MOAN will become as fast as (or even faster than) ours.

Good luck!

[email protected]
[email protected]

Copyright © 1996 Pat Hanrahan and Apostolos "Toli" Lerios