xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
// Geschwindigkeit der Aktualisierung
frameRate(5)
}
function draw() {
background (100);
// Gesamtbildrotation
//rotate (0.1);
// Schleife: wo ? wie lange ? wieviel pro durchlauf ? y=spalte x=zeilen
for (y=10; y<height; y+=30)
{
for (x=10; x<width; x+=30)
{
push();
r = random(30);
fill(255);
translate(x,y);
rotate(sin(millis()/1000));
rect(0, 0, 20, 20);
pop();
//rect(x, y, r,r);
}
}
}