|  |  | 
| Line 10: | Line 10: | 
|  | 
 |  | 
 | 
|  | right picture: |  | right picture: | 
|  | <source lang="java">
 |  | [http://www.uni-weimar.de/medien/wiki/GMU:Processing_im_Park/Katja_Bli%C3%9F/code2 Sourcecode] | 
|  |   |  | 
|  | PImage Rotten1;
 |  | 
|  | PImage Rotten2;
 |  | 
|  | PImage Rotten3;
 |  | 
|  | PImage Rotten4;
 |  | 
|  | PImage Rotten5;
 |  | 
|  | PImage Rotten6;
 |  | 
|  | PImage Rotten7;
 |  | 
|  | PImage Rotten8;
 |  | 
|  | PImage Rotten9;
 |  | 
|  |   |  | 
|  |   |  | 
|  |   |  | 
|  | void setup() {
 |  | 
|  |   size (400, 400);
 |  | 
|  |   background(0,0,0);
 |  | 
|  |   Rotten1 = loadImage("Rotten1.jpg");
 |  | 
|  |   Rotten2 = loadImage("Rotten2.jpg");
 |  | 
|  |   Rotten3 = loadImage("Rotten3.jpg");
 |  | 
|  |   Rotten4 = loadImage("Rotten4.jpg");
 |  | 
|  |   Rotten5 = loadImage("Rotten5.jpg");
 |  | 
|  |   Rotten6 = loadImage("Rotten6.jpg");
 |  | 
|  |   Rotten7 = loadImage("Rotten7.jpg");
 |  | 
|  |   Rotten8 = loadImage("Rotten8.jpg");
 |  | 
|  |   Rotten9 = loadImage("Rotten9.jpg");
 |  | 
|  |   frameRate(5);
 |  | 
|  |   
 |  | 
|  | }  
 |  | 
|  |   |  | 
|  | void draw() {
 |  | 
|  |   
 |  | 
|  |   println(frameCount);
 |  | 
|  |   
 |  | 
|  |   if(frameCount %9 == 1) {
 |  | 
|  |     //show grid for odd frames
 |  | 
|  |      image(Rotten1, 0, 0, 400, 400);
 |  | 
|  |   } else if (frameCount %9 == 2)
 |  | 
|  |   {
 |  | 
|  |     //show tree for even frames
 |  | 
|  |     image(Rotten2,0,0, 400, 400);
 |  | 
|  |   } else if (frameCount %9 == 3)
 |  | 
|  |   {
 |  | 
|  |     image (Rotten3, 0,0, 400, 400);
 |  | 
|  |   }
 |  | 
|  |    else if (frameCount %9 == 4)
 |  | 
|  |   {
 |  | 
|  |     image (Rotten4, 0,0, 400, 400);
 |  | 
|  |   }   
 |  | 
|  |   else if (frameCount %9 == 5)
 |  | 
|  |   {
 |  | 
|  |     image (Rotten5, 0,0, 400, 400);
 |  | 
|  |   }
 |  | 
|  |   else if (frameCount %9 == 6)
 |  | 
|  |   {
 |  | 
|  |     image (Rotten6, 0,0, 400, 400);
 |  | 
|  |   }
 |  | 
|  |   else if (frameCount %9 == 7)
 |  | 
|  |   {
 |  | 
|  |     image (Rotten7, 0,0, 400, 400);
 |  | 
|  |   }
 |  | 
|  |   else if (frameCount %9 == 8)
 |  | 
|  |   {
 |  | 
|  |     image (Rotten8, 0,0, 400, 400);
 |  | 
|  |   }
 |  | 
|  |   else if (frameCount %9 == 0)
 |  | 
|  |   {
 |  | 
|  |     image (Rotten9, 0,0, 400, 400);
 |  | 
|  |   }
 |  | 
|  |  
 |  | 
|  | }  
 |  | 
|  | </source>
 |  | 
|  | 
 |  | 
 | 
|  | 
 |  | 
 |