cs184-bi Andy Scheffler
cs184-dk Paul Mais

Sweep Generation: What is it?

Sweep generation, taking an arbitrary polygon and sweeping it along a Cubic Bezier Curve.

We hope to have, by the end of the assignment, a program that can take any polygon, given as a list of points, and extrude it, much like those little Play-Doh toys.

This project is almost infinitely extendable. We only touched upon the linear rotation and scaling abilities. Given more time, Bezier interpolated rotations and scales, as well as color manipulation would be simply done, and more complexly, transformation from one polygon to another.

We have defined an input format, the *.sweep format, that consists of three (or five) different commands:

Comments:

# this is a comment

Polygons:

polygon 1,1 1,-1 -1,-1 -1,1
Paths:
bezier 2,-4-2 0,-2,3 2,2,6 0,4,1

And the Optionals:
Starting Deformation Value (Rotate Scale):

start 0 1
Ending Deformation Value (Rotate scale);
end 90 2
As of now, we found it more difficult that useful to make multiple entry possible, so for now, only one poly statment and one bezier statment per file, please.

Our program takes four arguments: the input .sweep filename, the output .rib filename, the number of polygons to put on the path and 0 or 1, if Phong shading should be on or off.

The optional deformations will linearly interpolate scale and rotation values for the extrusion. The given example will rotate the polygon incrementally along the path, starting at 0 degrees and finishing at 90 degrees. The same applies for scaling.

test.gen input output 10 0
Will take input from the file input.sweep and output a sweep of the polygon along the path with 10 steps and no Phong shading into the file output.rib.

Preliminary Tests
Other Tests
Final Results

Last updated: December 7, 1996