GMU:Processing im Park/Regine Elbers/Quellcode

From Medien Wiki
< GMU:Processing im Park‎ | Regine Elbers
Revision as of 16:52, 6 January 2016 by Regine (talk | contribs) (Created page with "Homework two: sliced duck PImage img; PImage sourceImage; public void setup(){ sourceImage = loadImage ("IMG_3200.png"); image (sourceImage, 0, 0, 500, 500); } pub...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Homework two:

sliced duck


PImage img; PImage sourceImage;

public void setup(){


sourceImage = loadImage ("IMG_3200.png");
image (sourceImage, 0, 0, 500, 500);

}

public void draw(){

img = loadImage ("Park2.jpg");
int x = 30;
int width = 440;
int height = 11;
img.resize(500, 500);

for (int i = 40; i < 460; i = i +25) {
  copy(img, x, i, width, height, x, i, width, height);
}

}

 public void settings() {  size(500, 500); }
 static public void main(String[] passedArgs) {
   String[] appletArgs = new String[] { "HA_slice" };
   if (passedArgs != null) {
     PApplet.main(concat(appletArgs, passedArgs));
   } else {
     PApplet.main(appletArgs);
   }
 }

}