Dr. Nad's Java Collection Page 2
Stereoscopic Animated Hypercube
How to See It
Java
- If your browser supports Java,
you should see an animated image above (generated by a Java applet
embedded on the page).
Otherwise, you should see a static image.
Viewing
- View the image using red/blue 3D glasses. The red filter should be on the left.
Start by looking at the little square in the middle of the image.
I got my Garfield 3D glasses from a cereal box.
You can cook up your own 3D glasses using red and blue cellophane (a flower shop
might be a good source).
Colors
- This image works best with "true" colors.
If your browser is set up to display "dithered" colors,
you might want to change this setting.
In Netscape, you can change this using the "Options" menu, General Preferences,
Images--choose "Automatic" or "Substitute Colors".
Those with mild color-blindness may have trouble seeing the image.
Applets Author: Mark Newbold
The Image Morphing Applet
This is an implementation of a peculiar triangular morphing algorithm.
Starting with a source image, a destination image, and three control points for each image,
I basically divide each image into a mesh of triangles, using the four corners and three control
points as vertices. These triangles are then split into what I call simple triangles,
which are triangles with one horizontal edge. This results in 14 triangles for each image.
I then interpolate between each source/destination triangle pair to generate each frame of the morph;
I do a triangular scanline conversion into the intermediate frame triangle,
using the source and destination triangles as color sources
and the frame number (as a fraction of the total number of frames) as an alpha transparency
value for the sources. It's not very fast, and not very robust, but with carefully
selected images and control points it seems to work reasonably. Notice that the degree of morphing
(the degree of pixel tranformation and motion versus pure transparent fade and replacement) is
highest near the control points (which in this case are the eyes and nose of the people in the images),
dropping to zero at the edges of the image.
Using the Image Morphing Applet
Parameters
imagesrc | The source image |
imagedst | The destination image |
framecnt | The number of intermediate frames to generate |
interval | The animation frame rate interval in milliseconds |
cpt1 | The first control point pair, in the following format: srcX:srcY:dstX:dstY |
cpt2 | The second control point pair, in the following format: srcX:srcY:dstX:dstY |
cpt3 | The third control point pair, in the following format: srcX:srcY:dstX:dstY |
audio | An optional audio file to play (.au format) |
David Tompkins - dt@dt.org
|
To Java page 1
|