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

23 lines
311 B
Plaintext

float x1, y1, x2, y2;
float t = 0.0;
float increment = 0.01; // 0.1
void setup() {
size(500, 500);
x1 = (noise(t)) * width;
y1 =(noise(t + 100)) * height;
}
void draw() {
x2 = (noise(t)) * width;
y2 = (noise(t + 100)) * height;
line(x1, y1, x2, y2);
x1 = x2;
y1 = y2;
t += increment;
}