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

21 lines
351 B
Plaintext

float tt = 50; // change with time
void setup() {
size(800, 600);
noFill();
stroke(255);
}
void draw() {
background(0);
float tx = 0; // change with horizontal position
beginShape();
for (int x = 0; x < width - 1; x++) {
float y = 150 + noise(tx, tt) * 200;
vertex(x, y);
tx += 0.01;
}
endShape();
tt += 0.003;
}