Tensor Product Surface Pasting Editor

by Rick Leung

 

   The tensor product surface pasting editor is my term project for the course CS679 -- Splines and Their Uses in Computer Graphics at the University of Waterloo. The original intent of project is to create a usable surface pasting editor that will allow me to create some semi-interesting models. However, due to my severely limited artistic skills, among several other things, I personally think I have failed to meet my original goal miserably.

 

Background

    The front-end of the project is written using Tcl/Tk version 8.3.2. The editor program itself is written using Visual C++ and OpenGL. To display the OpenGL raster in Tcl/Tk, a slightly modified version of Togl was downloaded from somewhere on the web (I forgot the exact place, as I was desperately looking for pretty well any version of Togl that works with VC++.). The official version of Togl from Source Forge refuses to link with VC++ for some strange reason.

 

Basic Features of the Editor

    As a 3D object editor, the editor component of my surface paster comes across as a little light-weight. The following list contains most, if not all, the features that are supported by my editor.

Tensor Product B-Spline-related Features

    Note that the editor will artificially clamp the degrees m and n of the patch to range between 1 to 7. The upper limit of 7 seems to be a limitation imposed by the Windows version of OpenGL. Also, the number of segments in each direction of Tensor product B-spline is artificially clamped to range between 1 to 8 due to memory concerns.

Surface Pasting-related Features

In the way I implemented domain space pasting, patches that are created earlier will always be the base surfaces to patches that are created later. In other words, if patches A, B, and C are created in that order, then A is the base surface to both patches B and C, while B is a feature surface to A and a base surface to C. Patch C is the feature surface to both patches A and B.

Furthremore, as soon as the knot value (in either direction) of the feature surface coincides with the knot value of the base surface (in the corresponding direction, of course), the control point(s) of the feature Tensor product B-spline that is influenced by that particular knot is pasted onto the base surface.

GUI Features

 

Semi-Extra Features of the Editor

Note: On my ancient PC in Vancouver (a K6/233 with 64MB RAM and a Matrox Mystique 220), the Mann-DeRose algorithm made a world of difference in terms of the speed at which the surface editor program was exexcuted, compared to the basic de Casteljau algorithm. The increase in speed in turn translates into a significantly higher usability, as the frame rates that results from the basic de Casteljau algorithm is simply unbearably slow. On my much faster PC in Waterloo (a K7/800 with 256MB RAM and a nVidia GeForce2 GTS), however, the speed increase from the more efficient Mann-DeRose algorithm is not nearly as noticible. 

 

Extra Features of the Editor

Tensor Product B-Spline-related Features

 

Surface Pasting-related Features

The word "hierarchical" is put in quotes because the way the hierarchical translation is implemented is really a bit of a hack. Instead of actually manipulating the invertible matrix T that is associated with each Tensor product patch and accumulating the cumulative matrix transformations for the feature surfaces, my implementation actually jumps right in to modify the values of the knot vectors and Greville points. Since the order of creation dictates the base-feature relationship between different patches, this property is exploited to allow me to only update the knot vectors and Greville points of the feature patches of a given base patch.

 

GUI Features

Loading is implemented in such a way that it resembles "importing" more than it does "loading". Upon a "Load", instead of wiping out the patches that have already been drawn, the loading command simply adds the newly loaded surface to those that are already present in the editor. 

 

Modelling Objective

    This is the part of the project that I am most disappointed about, to the point that I am almost embarrassed about it. Instead of creating a good-looking model that will "blow the instructor away", my lack of artistic skills has prevented me from creating anything that looks remotely decent. To make things worse, even the act of creating ugly models is tedious and extremely time consuming. Here are two screen shots of my most successful model. Please be forewarned -- it looks BAD.

 

Miscellaneous Features That Are Too "Mickey Mouse" to be Listed along with Other Features

 

References

 

Special Thanks