Einblick in die generative Gestaltung mit «Processing»

Sechs Kursabende à vier Stunden an der EB Zürich

Kurskonzeption und Leitung Hanna Züllig


< back

						/*
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/
*/

int w = 800;
int h = 600;

int tile_w = 60;
int tile_h = 80;

color col = color(120,220,255,75);


void setup()
{
  size(w, h);
  smooth();
  frameRate(10);

  stroke(col);
  strokeWeight(3);
}

void draw()
{

  background(0);
 
  for (int j=0; j<=h/tile_h; j++)
  {
    for (int i=0; i<=w/tile_w-3; i++)
    {
      fill(col);
      line ((j+3)*tile_w, mouseY, i*tile_h, mouseX);
    }
  }
  
  if(mousePressed){
    
      saveFrame("masus.png");
    
  }
}