Implementation details & hints


 

9/30/98
Linear algebra library

Check the news group for a posting from Ian on an easy-to-use vector library.
You may also want to check out the Inventor linear library. To use it, just include < Inventor/SbLinear.h> and use the class SbVec2f. Other neat classes : SbVec3f, SbLine, SbPlane, SbBox2f, SbBox3f, SbMatrix, SbRotation... All these have man pages.
 

Behavior of the user interface:


Inventor viewers have 2 modes: viewing and editing. You can toggle between them by pressing ESC.

The format of the configuration file

The file may contain an arbitrary number of comment lines, that start with "#".
If no initial image has been specified at the time when the config file was saved, "InitialImg" should not appear in the file. If no final image was specified, "FinalImg" should not appear. If no lines were drawn, "LinePairs" should not appear. 


 

Creating a movie

The "SaveMovie" menu should just write out 11 frames, at morphing parameters 0, 0.1, 0.2, ... 0.9 and 1. To convert these to a movie, use the program movieconvert.

 

Mapping functions

The direct mapping function determines where a point from the initial or final images wants to go on the morphed image. The inverse (backward) mapping function determines where in the initial or final images does a point in the morphed image come from. You need backward mapping to perform the pixel-by-pixel morph and the direct function to show the warping grid. 

Debugging and profiling

SGI has a very good debugging environment, with integrated profiler. Run
%cvd morph
and set a profiling task from the Perf menu. There is extensive on-line documentation. Run
% insight
and select the books on Developer Magic: Debugger's User's Guide, Performance Analyser User's Guide, etc.
Note that "The Inventor Mentor" and "OpenGL User's guide" can also be accessed through insight.