GMU:Actors, Traces, Collectives/SS17/Schachbrettmuster: Difference between revisions

From Medien Wiki
(Created page with " <syntaxhighlight lang="javaScript"> int size = 50; void setup(){ size (600, 600); } void draw(){ for (int h = 0; h < width; h += size) { for (int v = 0; v < height;...")
(No difference)

Revision as of 06:26, 10 June 2017

int size = 50;

void setup(){
 size (600, 600);
}

void draw(){
  for (int h = 0; h < width; h += size) {
    for (int v = 0; v < height; v += size) {
      if ((h+v) % 20 == 0) {  
        fill(255); 
      }  
      else { 
        fill(0);
      } 
      rect (h, v, size, size);
    }
  }
}