IFD:GenerativeBauhaus WS2012/Karim

From Medien Wiki

Punkt

Punkt mit Maus platzieren

Einfache Funktion um einen Punkt mit der Maus zu platzieren, klickt man mit der linken Maustaste, wird der Frame als .jpg gespeichert und der Punkt bewegt sich nicht mehr.

Screenshot 1


Screenshot 2


float a;
float b;

void setup() {
  size(600,600);
  smooth();
  noStroke();
  fill(0);
}

void draw() {
  if(finished) {
    background(255);
  } else {
    background(255);
    ellipse(a,b,60,60);
    a = mouseX;
    b = mouseY;
    if(mousePressed) {
      ellipse(a,b,60,60);
    }
    if(mousePressed) {
      ellipse(mouseX,mouseY,60,60);
      saveFrame("punkt-####.jpg");
      finished = true;
    } else {
      finished = false;
    }
  }
  
}


Acht zufällig platzierte Punkte

Es werden acht Punkte zufällig auf dem Canvas verteilt. Klickt man mit der Maus wird der Frame gespeichert und es werden acht neue Punkte verteilt.

Screenshot 1


Screenshot 2


float count;


void setup() {
  size(600,600);
  noStroke();
  fill(0);
  background(255);
  count = 0;

}

void draw () {
  if(count < 8) {
    float a = random(600);
    float b = random(600);
    ellipse(a,b,60,60);
    count = count + 1;  
  }
  if(mousePressed) {
    saveFrame("Random-####.jpg");
    count = 0;
    background(255);
  }
}


Linie


Schwarz bis Weiß

Eine Linie wird Schwarz gezeichnet und bewegt sich von links nach rechts, wobei sie bei jedem Schritt eine Tonstufe heller wird.
Ist die Linie bei der Tonstufe 255 angelangt, startet eine weitere Linie welche die Tonwerte umkehrt.

Verlauf 1


Verlauf 2


float a;
float b;
float c;
float d;



void setup() {
  size (255,255);
  background (255);
  a = 0;
  b = 0;
  c = 0;
  d = 255;
}

void draw () {
  if(b < 255) {
  stroke(a);
  line (b,255,b,0);
  a = a + 1;
  b = b + 1;
  } else {
      stroke(d);
      line (c,255,c,0);
      c = c + 1;
      d = d - 1;
  }
}


Random Lines

Es werden zufällige XY Koordinateen ausgewählt und zwischen diesen dann Linien gezeichnet.

Random Lines 1


Random Lines 2


float a;
float b;
float c;
float d;
float strokecolor;

int xlimit = 40;
int ylimit = 560;



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


void draw () {
  float strokecolor = random(0,0);
  float a = random (xlimit,ylimit);
  float b = random (xlimit,ylimit);
  float c = random (xlimit,ylimit);
  float d = random (xlimit,ylimit);
  stroke (strokecolor);
  line (a,b,c,d);
}


Form

Formkontrast, Quantitätskontrast


Es wird ein Feld mit einer der drei Grundformen "besprenkelt". Darunter wird eine zufällig gewählte Grundform generiert um den Kontrast zu verdeutlichen.

Formen1


Formen2


Formen3




float place = 400;
float big = 50;
float count = 0;
float KreisG = 0;
float xpos;
float ypos;
float ybig;

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

   String[] formen = {"kreis", "rechteck", "dreieck"};
   int pick = int(random(formen.length));
   
   String[] formen2 = {"kreis", "rechteck", "dreieck"};
   int pick2 = int(random(formen2.length));
   
   
void draw () {
  translate (50,50);
  noStroke ();
  fill (0);
  
  count += 1;
   
  if (formen[pick].equals ("kreis")) {
  KreisG = random (50);
  ellipse (random (place), random (place), (KreisG), (KreisG));
  }
  if (formen[pick].equals ("rechteck")) {   rect (random (place), random (place), random (big), random (big));  
  }
  if (formen[pick].equals ("dreieck")) {
  xpos = random(400);
  ypos = random(400);
  ybig = random (50);
  dreieck (xpos, ypos);
  }
  if (formen2[pick2].equals ("kreis")) {
    ellipse (200,475,50,50);
  }
  if (formen2[pick2].equals ("rechteck")) {
    rect (175,450,50,50);
  }
  if (formen2[pick2].equals ("dreieck")) {
    triangle (175,500,225,500,200,450);
  }
  if (big < 20) {
    big += 0.1;
  }
//  if (count >= 60) {
//   noLoop ();
//   saveFrame ("Formen-####.jpg");
//  }
  if (mousePressed) {
    noLoop ();
    saveFrame ("Formen-####.jpg");    
  }

}

 void dreieck (float xpos, float ypos) {
 triangle (xpos, ypos, xpos +ybig, ypos, xpos +ybig/2, ypos -ybig);
 }
 
 void neustart () {
  background (255);
  smooth ();
 }


Format

3D Szene in verschiedenen Formaten

Hochformat


Querformat


Panorama



Farbe

Ittens Farbkreis (Akryl)

Farbkreis nach Itten



Farb- und Formkontraste

Analoge Schwarzweißbilder in Photoshop bearbeitet.


7b8a74


7b8a74No2


a06548


dd362f


e7c3d9