Files
sunny9898/task8/wk7/wk7_exercise2_template/wk7_exercise2_template.pde
louiscklaw 5637fbf94f update,
2025-02-01 02:07:58 +08:00

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);
}