Contents
What is it and what does it do?
How do I use it?
Which browsers work with it?
How does it use VisAD?
How do I stretch a different image?
What is it and what does it do?
The applet is a preliminary version of a program to stretch images
into neat
shapes. Maybe it's not as powerful as Kai's Power Goo, but it's fun
nonetheless. This preliminary version is quite slow, and I recommend a
lot of
processing power, or a patient personality. Fortunately, the applet
prints
messages to the screen corresponding to the step it is working on. The
"interpolating normalized values" step takes the bulk of the processing
time.
How do I use it?
Drag the grid points around using the mouse. Make sure that you
keep all
grid points convex. If any become concave (i.e., vaguely arrowhead
shaped),
the program will not be able to stretch the image. Also, I recommend
leaving
the grid border intact in this version. Moving a border point inward
could
crash the applet. Moving one outward works, but only the original image
area
will be stretched and displayed.
Short button descriptions:
Go
See the results of your grid manipulation.
grid
Show or hide the grid, for a better view of the image.
image
Show or hide the image, for a better view of the grid.
norm
Put the image back to normal (original).
reset
Reset the grid back to normal (uniform).
Which browsers work with it?
The applet runs very fast with Internet Explorer 4. The applet
works okay,
albeit more slowly, using Netscape Navigator 4.04 for Windows 95,
Windows NT 4,
or SunOS 5.5.1. The applet works using Netscape Navigator 4.04 for IRIX
5.3,
but runs very slowly for some reason (even the redraw of the grid in
the
paint() method is unreasonably slow). Of course, the applet runs fine
in
JDK 1.1's appletviewer. It has not been tested on any browser other
than
those mentioned above.
How does it use VisAD?
The applet uses VisAD's Set class logic, specifically the
Gridded2DSet class,
to resample the image from the original uniform grid, saved in memory,
to the
new twisted grid, computed based on interpolation from the user's grid
manipulations. The Gridded2DSet class file that the applet uses is a
"lite"
version of VisAD's "real" Gridded2DSet. It contains only the methods
that the
applet needs to function (the applet relies primarily on the
valueToGrid and
gridToValue methods), so that it can be quickly downloaded and
executed. For
more information on the VisAD scientific visualization package, see
the VisAD home
page.
How do I stretch a different image?
If you want to use your own image in place of the one provided,
save
this html file, as well as the Java class
files
ImageStretcher.class and
Gridded2DSet.class, and edit the
line in the
html file that reads:
<param name="image" value="image.gif">
Change the value to the image of your choice, then reload the edited
html file
in your browser. You might also need to change the "width" and "height"
parameters if the applet window is no longer large enough. Also
remember,
the larger the image, the longer the stretching will take.
This page last updated Tuesday, February 10, 1998, by
Curtis Rueden, http://www.ssec.wisc.edu/~curtis/