Surface Paster

Victor Irzak

December 30, 2002


Contents

Overview

Surface paster is a software that implements surface pasting of b-spline surfaces on top of each other. This is an interactive program that allows user to control such process.

This page describes this program. There are pdf and ps copies of this document.

Here is a surface paster screen shot:

window1_small.png

file=window1_small

Basic Functionality

The program allowes the user to build a patch, add another patch on top of the previous patch and manipulate the mapping function of the feature patch domain to base patch domain.

Extra Features

Hierarchy

Every new patch, except the root patch, must be assigned to a parent. When the parent is changing the child must change accordingly. Here is an example of such hierarchy:

hier_small.png

file=hier_small

Patch 1 is the root patch. Patches 2 and 4 are the children of patch 1 and patches 3 and 5 are the children of patch 2.

Control points schemes

There are two schemes implemented:
* Control points are evenly spaced

even.png

file=even

* Control points are at Greville points

grev.png

file=grev

In general the Greville scheme works better. Here is an example. on the left (greville) there is more visible area then on the right (even). In this case only the border control points have different schemes.

grev_2_small.png even_2_small.png  
In the following example the all control points are affected by the scheme:

grev_4_small.png even_4_small.png

Rotation

I implemented rotation by the same principle as scale and translation. This is where TCL/TK was not the best choice for UI, since I had to rewrite rotation procedures in TCL to change the item of the canvas.

rotation_small.png

file=rotation_small

Model

For my model I made this duck:

duck_small.png

file=duck_small

I came up with this idea accidentally, when I was testing my hierarchy and a similar set of patches and colours resembled a duck.

Here it is again with wireframe and rotation:

duck_3_small.png

file=duck_3_small

I came up with this idea accidentally, when I was testing my hierarchy and a similar set of patches and colours resembled a duck.

Movie generation

To generate a movie I needed to run the editor, build patches and record all the changes (with timestamps) to the OpenGL window.

Then I needed to run the viewer program that will reproduce the changes and save the frame on the screen every t milliseconds to have 1000/t frames per second.

After frames have been generated, they were combined into a movie using ffmpeg package.

Here is a snapshot of by playback program:

playback.png

file=playback_small

Movie

The movie that demonstrates the above features is available in avi or mpg formats.

The old version is here

Software and Links

Software

* TCL/TK
- I designed my user interface with it.
* Togl
- a Tk OpenGL widget
* Combobox
- Tk Combobox widget
* FFmpeg
- Created movie on linux platform.
* ImageMagick tools
- Really nice tools to manipulate images.
* Gimp
- Image editor. I used it to capture the screen.
* LATEX
- Generated documents.
* LATEX2HTML
- Allowed me to easily build a webpage.

Links

* CS779 Webpage
- Contains different splines projects.
* Surface Pasting Webpage
* Cristin Barghiel - Feature Oriented Composition of B-Spline Surfaces
* Marryat Ma - Dirtect Manipulation of Pasted Surfaces

Acknowledgments

Thank you very much:

* Stephen Mann
- who agreed to be my instructor for this course, as well as giving me a lot of his free time and ice-cream.

* Selina Siu
- who gave me the idea to choose this project, and helped me on other occasions.

* All CGL members
- who made me feel welcome in the lab.



Victor Irzak 2002-12-30