No edit summary |
No edit summary |
||
Line 55: | Line 55: | ||
[[File:klick1.jpg|200px]] [[File:klick2.jpg|200px]] [[File:klick3.jpg|200px]] | [[File:klick1.jpg|200px]] [[File:klick2.jpg|200px]] [[File:klick3.jpg|200px]] | ||
[[File: | [[File:klick4.jpg|200px]] |
Revision as of 16:38, 12 January 2011
Durch verschieben der Maus verändert sich die Größe der Rechtecke/Dreiecke/Kreise
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();
}