C++ Blossoming Software
Last Updated: October 10, 2012
The new version of the blossom library includes the old version with
one minor bug fix, and an extension to bi-variate tensor product
surfaces written by Kenny Fok.
This code implements a C++ class for blossoms. For a description
of blossoms, see Ramshaw, Blossoming: A Connect-the-Dots Approach
to Splines, Digital Systems Research Center report #19, 1987.
For a description of this software, see Liu-Mann, Programming
Support for Blossoming, GI '96 Conference Proceedings.
- To compile, you need a C++ compiler that can handle templates.
- You will also need the following from STL:
algobase.h, iterator.h, defalloc.h, and algo.h
- From Richard Bartel's GP classes, you will need NewC++ and GPLex.
The GP.tar.Z found here is a version of the GP classes that
work with the blossom library.
- The relevant files in GPStorage are GPStorage.cc and GPStorage.h.
GPStorage/Examples has an example program that tests the stl-like
capabilities of GPStorage. It is not needed for the blossom classes.
The GPStorage class provides variable-length storage used by the
rest of the blossom classes. I've modified it slightly from the
GPStorage as currently exists in the GP package.
- The relevant files in Space are DoubleDomain.h/cc and PtDomain.h/cc,
DoubleDomain is a geometry class for 1-D space using the built-in
double type. PtDomain provides variable-dimension spaces. It uses
the ge.* files to do gaussian elimination.
If you wish to subsitute your own geometry package, you must
declare new objects of Blossom,
KnotNet and TriArray, in place
of those used by Space.
- The relevant files in TriArray are TriSize.h/cc, MultiIndex.h/cc and
TriArray.h/cc. Other files are not relevant.
- The relevant files in Blossoms are KnotNet.h/cc, CountedIter.h,
BlossomOps.h/cc and Blossom.h/cc. The file BezKnotNet.h/cc is an
attempt at making a special knot net class for Bezier basis, but it
is not finished.
- The Test directory contains the example code. Algorithms.h/cc contains
the code from the GI paper (with bugs removed). The GenerateDriver
script uses the files Common.interface, PtDomain.interface,
TriArray.interface and Blossom.interface to create CommonTest.cc
PtDomainTest.cc, TriArrayTest.cc and BlossomTest.cc. These are compiled
and linked with TestHarness.h/cc to produce the executable Test.
Test is a program that read a command # from standard input and calls
the appropriate function defined in the *.interface files. To make
the interface nicer, the m4 macro processor is used to give symbolic
names to each command #.
Examine the file testcase for an example of how to "program" using
this interface. The testcase can be executed as follows:
m4 *.define testcase | ./Test
To debug a test case, enter
m4 *.define testcase | ./Test 1
which makes Test print out the available options at each step.
To use the program interactively, enter
m4 -e *.define testcase - | ./Test 1
- Credits: We use ge.cc from netlib code in our implementation of Space.
Stephen Mann firstname.lastname@example.org
Wayne Liu email@example.com
University of Waterloo | School of Computer Science | 200 University Ave. W. | Waterloo, Ontario Canada | N2L 3G1
| 519.888.4567 | www.cgl.uwaterloo.ca/~smann/