THE SOFTWARE 

The software used in the show was developed over the course of seven years. It was prototyped during my first four years at EVL, resulting in an animation program. I wrote the program with Sumit Das, an
Electrical Engineering and Computer Science MS (and later, Ph.D.) student. That program was written in the C programming language, used the Silicon Graphics Iris GL graphics library, and contained more than 50,000 lines of code.

The software I developed for the show was written over the course of a year and a half in C++, used the
OpenGL graphics library, encompassed over 44,000 lines of code, more than 75 classes and approximately 150 files. It was significantly changed in functionality and design from the prototype animation system.

There were five programs used in the show. The first, and simplest, was a music playback program that played each of the eight themes that were used in the CAVE piece, end to end. Its construction required the sound files to be in a certain directory, and the program simply executed system commands -- e.g.,
system( "playaiff soundfile.aiff" ); to cause the machine to play the themes.

The second program was to train viewers in the use of the subsequent pieces. My thought was to have a basic, bare-bones mockup of the pieces, keeping only the most essential interactive elements. In this case the most essential elements were two black lines displayed on the monitor, and the mouse, which could be used by the viewer to pick and redraw each line. When a line was redrawn, it would move from its position to the redrawn position, accomplishing the motion with physically-based algorithms. This was a 2D display.

The third program was a fancier version of the second program. It utilized the ImmersaDesk and the Wand to allow the viewer to draw "in the air". The same algorithms were used to accomplish the motion as in the second program, but in this version the viewer could draw four lines, and in 3 dimensions. To draw, the viewer used a virtual extension to the wand that was shaped like the end of a felt-tipped pen. The pen was constructed from OpenGL graphics primitives -- spheres, disks and cylinders.

Textured graphic elements and background music were added, as well as audio feedback when the viewer drew a line or pressed a button. Also of note was the prompting system, which timed events or gave the viewer messages. For this process, the program read several files:
 
 
File Description
clock_period  amount of time the "time almost up" message was displayed -- 4 seconds
drawing_period  time allotted for drawing -- this was 80 seconds (one minute, 20 seconds)
duration_period  duration of the entire piece -- 480 seconds or 8 minutes
grace_period  time between the "time almost up" message and the "switch glasses" message -- 15 seconds
switch_glasses_period  amount of time the "switch glasses" message was displayed -- 10 seconds
 

and used the UNIX/C commands "signal" and "alarm" to send a software interrupt to the running process, which then caught the interrupt and called a function:

// tell our program to call this function
// when the SIGALRM signal is caught

signal( SIGALRM, function_to_call ) ;

// read the number of seconds to wait before
// sending the signal

FILE * fp = fopen( "grace_period", "r" ) ;

int seconds ;

fscanf( fp, "%d", & seconds ) ;

// tell the unix kernel to send the software interrupt
// SIGALRM to this program in "seconds" amount of time

alarm( seconds ) ;

The fourth program utilized the 4-wall CAVE and expanded thematically upon the third program. The viewer was put into a virtual environment consisting of a walkway, four drawing areas, and an entryway  into a large room. The virtual environment was constructed using the same 3D drawing interface that acted as the foundation of the show. I wrote a program which used the Wand to navigate in an empty virtual space, allowing me to translate, rotate, and scale the space up and down (or alternatively, "grow" and "shrink" myself) using the wand buttons. The wand buttons were also used to add new lines to the environment, change their positions, and add polygonal meshes between them. In this way, I was able to interactively create and sculpt the environment.

Once in the environment, the viewer was prompted to press a button to move forward and was then propelled, as if on a conveyor belt, to the first of four drawing areas. As the viewer approached the drawing area, the background music rearranged itself, while playing, to the appropriate theme. Each of the four drawing areas, and the room, had its own background music.

At this first area was a ribbon which behaved similarly to one of the lines in the previous programs, in that the viewer could change its position by redrawing it, with the exception that it changed its color based upon its curvature.

When the viewer left any of the four drawing areas, an image of what he or she had drawn was "shapshotted" and saved in a specific directory. This image could then be used by the fifth program to make a refrigerator magnet.

The second drawing area contained a loop with straight appendages that hung from it, swinging as it moved. The third station housed a line that left a trail when repositioned, as did the fourth station.

The hallway had animated texture-maps pointing the way into the room, which contained a loop that left a rotating trail and reflected the walls of the room. Once the viewer entered the room, he or she was no longer constrained to the walkway. He or she could turn and move in any horizontal direction, but could not move through the walls.

The fifth program read images saved by the fourth program and sent those images to be printed by a color printer. To make this process work, I had to determine the best method of printing a bitmapped image. I settled on the color printer, at 1/4 the size of an 8 1/2 by 11 sheet of paper, using a certain resolution. The following is the entire list of image-processing operations done to make each image printer-ready:

#brightening the image
gammawarp input_image.rgb TMP/brite.rgb .33

#overlaying a border onto the image
#(the border was premade, and stored in TMP/mat.bw)
iblend TMP/brite.rgb TMP/black.rgb TMP/tmp.rgb TMP/mat.bw

#rotating the image 90 degrees
iflip TMP/tmp.rgb TMP/brite.rgb 90

#converting the image to postscript
tops TMP/brite.rgb -x 95 -y 90 -a 0 -l 60 -cmyk > TMP/x.ps

#viewing the image before printing
ipaste TMP/tmp.rgb

#printing the image
lpr -Pevlcolor TMP/x.ps

Then the printout was trimmed with a paper cutter, laminated using a lamination machine, and attached to adhesive-backed magnetic material. The result was a refrigerator magnet for the viewer to take home.
 


Artist's statement | Preplanning | Postcard | Press
Construction | Show Opening | Documentation
Photos | Refrigerator magnets