22 lines
261 B
Plaintext
22 lines
261 B
Plaintext
float x = 0; // change with horizontal position
|
|
|
|
void setup() {
|
|
|
|
size(600, 400);
|
|
noLoop();
|
|
}
|
|
|
|
|
|
void draw() {
|
|
background(255);
|
|
|
|
for (int i = 0; i < width; i++) {
|
|
point(i, 150 + noise(x) * 200);
|
|
x += 0.01;
|
|
}
|
|
}
|
|
|
|
void keyPressed() {
|
|
redraw();
|
|
}
|