Source Code

The source code of MOAN was developed on a Silicon Graphics workstation, equipped with OpenGL. It is very simple, modular, and extensively documented. It is written in C for portability, but its structure follows an object-oriented paradigm. It is available in three parts on the Leland file system:
  1. The X Windows/OpenGL interface code, encapsulated in the general purpose library for graphics applications, adapted from the auxiliary library of The OpenGL Programming Guide. This library is installed in
    /usr/class/cs248/support/
    
    The source code can be found in the subdirectory src/libaux.

  2. The portion of the code handling the management of scene trees, including I/O, rendering, navigation, and updates for various keyframe interpolation schemes. This is encapsulated in a library installed in
    /usr/class/cs248/support/
    
    The source code can be found in the subdirectory src/libst.

  3. The user interface module, encapsulated in four files available from
    /usr/class/cs248/assignments/assignment3
    
    These files are moan.h, moan.c, interpolate.h, and interpolate.c. However, the version of interpolate.c available in this directory is not the same as the one used to generate the provided executable moan. In particular, the implementation of the cubic keyframe interpolator is absent. Thus, if the provided interpolate.c is used without alterations to port MOAN to other platforms, the ported executable will allow the user to specify cubic keyframe interpolation, but will not perform any interpolation in response.
The source code is made available for three reasons:
  1. It illustrates how simple it is to code up the very powerful abstraction of hierarchical modeling. The object-oriented structure and extensive comments make it easy to follow the code once the student has become familiar with the technique of hierarchical modeling.

  2. The provided executable moan executes only on Silicon Graphics workstations equipped with OpenGL. Hence, students may wish to port MOAN to other platforms.

  3. Since MOAN's user interface is fairly complex, and possibly confusing, students may wish to code an alternative front-end to it. This requires substituting/modifying only moan.h and moan.c.

Last update: 2 July 1996 by
Apostolos "Toli" Lerios