Einblick in die generative Gestaltung mit «Processing»

Sechs Kursabende à vier Stunden an der EB Zürich

Kurskonzeption und Leitung Hanna Züllig


< back

						/*
Autor: Regula Michell
Kurs: Einblick in die generative Gestaltung mit processing ip971221
Kursleitung: Hanna Zuellig
Veroeffentlicht unter der creative common license Attribution-NonCommercial-ShareAlike
CC BY-NC-SA  http://creativecommons.org/licenses/
*/
void setup (){
size(500,500);
}

void draw(){
  if (mousePressed){
      background(0);
      stroke (255);
  }
  else{
    background(255);
    stroke (0);
  
  }
  
  
for (int x = 0; x <= 480; x = x + 20){
  

  for (int y=0; y <= 480; y= y + 20){
 
        noStroke();
        fill(0);
        rect(0+x, 0+y, 5, 5);
        rect(0+x, 5+y, 5, 5);
        fill(255);
        rect(0+x, 10+y, 5, 5);
        rect(0+x, 15+y, 5, 5);
        rect(5+x, 0+y, 5, 5);
        rect(5+x, 5+y, 5, 5);
        fill(0);
        rect(5+x, 10+y, 5, 5);
        rect(5+x, 15+y, 5, 5);
        rect(10+x, 0+y, 5, 5);
        rect(10+x, 5+y, 5, 5);
        rect(10+x, 10+y, 5, 5);
        rect(10+x, 15+y, 5, 5);
        fill(255);
        rect(15+x, 0+y, 5, 5);
        fill(0);
        rect(15+x, 5+y, 5, 5);
        fill(255);
        rect(15+x, 10+y, 5, 5);
        rect(15+x, 15+y, 5, 5);
        
  }//end innen
  
  }//end aussen
if(keyPressed && key=='s'){
    // deaktiviert bei display ueber processing.js  saveFrame("Regula-####.jpg");
  }
}//end draw