23 lines
351 B
Plaintext
23 lines
351 B
Plaintext
void setup() {
|
|
size(400, 400);
|
|
background(255);
|
|
rectMode(CENTER);
|
|
}
|
|
|
|
void draw() {
|
|
// fading effect
|
|
fill(255, 32);
|
|
noStroke();
|
|
rect(width/2, height/2, width, height);
|
|
|
|
float x = random(width);
|
|
float y = random(height);
|
|
float r = random(TWO_PI);
|
|
|
|
translate(x, y);
|
|
rotate(r);
|
|
stroke(0);
|
|
fill(150);
|
|
rect(0, 0, 50, 50);
|
|
}
|