No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
[[File:dreieck1.jpg|200px]] [[File:dreieck2.jpg|200px]] [[File:dreieck3.jpg|200px]] | [[File:dreieck1.jpg|200px]] [[File:dreieck2.jpg|200px]] [[File:dreieck3.jpg|200px]] | ||
[[File:kreis1.jpg|200px]] [[File:kreis2.jpg|200px]] [[File:kreis3.jpg|200px]] | |||
Revision as of 16:18, 12 January 2011
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();
}