This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Katy Benoit
April Davidson
Rachel Hailey
Program Altering

The program that we choose was Animator in Topics, Drawing. The original purpose of the program was to display 24 different images (created by drawing over the window with the mouse) and display each image for 30 milliseconds.

In the opening section of the program we changed the number of frames that would continuously play from 24 frames to 30 frames. We found that we could not do more than 30 frames without stalling the program. In the void setup() section we changed the size of the display window from 640 x 200pixels to a square of 500x 500pixels. We also changed the stroke weight of our animation from 12 up to 20 making it a larger line. We added the option of having a color for the stroke by inserting the function stroke() and used a hexadecimal color for this; #B33AAA, a purple color. We removed the smooth() function from the program which made the stroke more pixelated looking. We then changed the background window from a normal grayscale to a picture that we designed in paint and inserted as a file into the program. We did this by inserting the following functions. b = loadImage("CSpic.jpg"); b.resize(500, 500); background(b);. This was one of the more challenging things that we attempted to do. It resulted in many error messages before the picture actually worked. The main problem was getting the program to recognize the file. We figured out that using the sketch menu in the program and scanning down to Add file we could make it work.

In the void draw() section we attempted to change the time that the image is displayed by changing the time interval in the following function: int currentTime = millis() from millisecond to seconds. We found that doing this took away from the animation affect of the program so we changed it back. We did change the 30 millisecond interval to 0 millisecond; making it a continuous image that never disappeared. We altered the animation method by changing the if (mousepressed ==) function from true to false. This made it so you didn’t have to click the window with the mouse to draw but merely run the mouse over top of the window. In the image() function we changed the x position from 0 to 250. We expected this to change where the line was initially drawn. Instead it resulted in a split screen that only held the image drawn on the left side (0-250) and repeated that image on the right side (250-500) but would not draw an image on the right side originally.

We tried to make many other changes with the functions containing get() functions but were not able to make anything work as the program referenced back to these functions throughout and we didn’t know or understand exactly what their individual purposes were in order to change them. The other thing we attempted to was changed the stroke to be a shape, like a triangle, instead of merely a line. The only thing that we ever got to happen with this attempt was our drawn line to become very small and back to the original color of black. I believe that if we had understood what every function in the program did we could have figured this out.

Source code: Animator_4_

Built with Processing