Digital Bauhaus Vorkurs/Projekte/Raster: Difference between revisions

From Medien Wiki
No edit summary
No edit summary
Line 1: Line 1:
[[File:processing-2.jpg|200px]]    [[File:processing-1.jpg|200px]] [[File:processing-3.jpg|200px]]
[[File:processing-2.jpg|200px]]    [[File:processing-1.jpg|200px]] [[File:processing-3.jpg|200px]]
[[File:dreieck1.jpg|200px]]    [[File:dreieck2.jpg|200px]] [[File:dreieck3.jpg|200px]]





Revision as of 16:11, 12 January 2011

Processing-2.jpg Processing-1.jpg Processing-3.jpg

Dreieck1.jpg Dreieck2.jpg Dreieck3.jpg




Durch verschieben der Maus verändert sich die Größe der Rechtecke


void setup() {

 size(400,400);
 smooth();

}

int R; int G; int B; int zeileY = 0; int zeileX = 0; int r;

void draw() {

 background(90,64,31);
  
 
 int spalten = 10;
 for (int zeileY=0; zeileY<spalten; zeileY++) {
   for (int zeileX=0; zeileX<spalten; zeileX++) {
     
     int posX = width/spalten * zeileX;
     int posY = height/spalten*zeileY;
     
  noFill();
  stroke(209,152,82,255);
  rect(posX,posY,mouseX,mouseY);


  strokeWeight(1);
   }
 }

}

void mousePressed()
{
  stop();

}