Sechs Kursabende à vier Stunden an der EB Zürich
Kurskonzeption und Leitung Hanna Züllig
/* Autor: Masus Meier Kurs: Einblick in die generative Gestaltung mit processing ip971241 Kursleitung: Hanna Zuellig Veroeffentlicht unter der creative common license Attribution-NonCommercial-ShareAlike CC BY-NC-SA http://creativecommons.org/licenses/ */ float angle=0; float angleinc=0.5; int h = 100; color c = color(h,50,50); void setup(){ colorMode(HSB); size(480,360); smooth(); } void draw(){ if(mousePressed==false){ // background(255); //Variante fill(0,5); rect(0,0,width,height); // hintergrund // linie strokeWeight(2); h=h+1; stroke(h,50,50); } else { //background(0); //Variante fill(255,1); rect(0,0,width,height); stroke(255); } for(int y=5; y<=height; y+=80) { for(int x=5; x<=width; x+=80) { println(c); pushMatrix(); translate(x,y); rotate(radians(angle)); line(-50, -50, 50, 50); popMatrix(); } } //######## 6. hier wird der Winkel um einen Schritt erhöht angle+=angleinc; //Bild exportieren if(keyPressed && key=='s'){ saveFrame("Rotation_####.jpg"); } }