Decorative Mosaics -- Software -- Curves
I've prepared a primitive program for recording curves.
You may want to look at the source code, but
you may find it simpler just to download and run curves.exe , which has been pre-compiled for MS
Windows.
Using Curves
The program is invoked with the following command line:
curves -i image-file -c curves-file
(If you're running Microsoft Windows, you should use 'Notepad' to
create a file with a ".BAT" ending, which contains a single line with
the above invocation. You'll have to replace 'curve-file' and
'image-file' with the names of your own data files).
The two data files are:
- Original Image: This is a raw (binary) PPM file. See the main page for info on creating this
format.
- Curves: This file will contain the curves which you want to
emphasize on the image. The main page
describes its format.
User Interface
This program is not complicated, but it's not user-friendly either.
It uses the keyboard and the mouse to draw curves.
Keyboard commands are as follows (these are lower-case letters; make
sure your caps-lock is OFF):
- a start a new curve. After pressing
a, you should move the mouse along the boundary
you desire, and click the left button where you want a to add a
point to the curve.
- u undo. This removes the last point
added to the current curve.
- c close curve. This turns your cuve into a
closed curve, by joining its first and last points.
- s save all curves. This updates the curve-file
which you specified, when you first invoked the program.
- q quit the program.
Alejo Hausner,
Department of Computer Science,
University of New Hampshire
Last modified: Mon Apr 15 14:41:52 EDT 2002