Digital Bauhaus Vorkurs/Projekte/Kleckse

From Medien Wiki

DasDie &Der Klecks

1. Kleine Kleckse a.k.a. Spritzer.

Bildschirmfoto 2011-04-09 um 22.16.17.png Spritzer2.png Spritzer3.png

* CODE

2. Ellipse-Spritzer und Farben

Ellipseklecks1.png Ellipseklecks2.png


* CODE

int x = width/2; int y = height/2; int s = 10; int c = 255; int a; int klexkomplex = 5; int dichteMin = -10; int dichteMax = 10;


void setup () {

size(700,700); smooth(); background(0); noStroke(); reset();


ellipse(x,y,s,s);

}

void reset() {

 background (255);
 x = (int)random(width);
 y = (int)random(height);
 s = (int)random(255);
 c = (int)random(238);
 

}

void draw () {

if(klexkomplex > (width/15) ) {

 return;
 

}

ellipse(x,y,s,s);

int i; for(i=0; i<klexkomplex; i=i+1) {

 x = x + (int)random(dichteMin,dichteMax);
 y = y + (int)random(dichteMin,dichteMax);
 c = (int)random(255);
 a= (int)random(0,100);
 s = (int)random(dichteMin,dichteMax);
 fill(c, 191, 255);


}

ellipse(x,y,s,s);

}



void keyPressed() {

 if ((key== 'r')) {
 
 reset(); 
 }
 

}

void c() {

 if (key== 'h') {
 

} }