mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
23 lines
352 B
Plaintext
23 lines
352 B
Plaintext
/**
|
|
* Random.
|
|
*
|
|
* Random numbers create the basis of this image.
|
|
* Each time the program is loaded the result is different.
|
|
*/
|
|
|
|
void setup() {
|
|
size(640, 360);
|
|
background(0);
|
|
strokeWeight(20);
|
|
frameRate(2);
|
|
}
|
|
|
|
void draw() {
|
|
for (int i = 0; i < width; i++) {
|
|
float r = random(255);
|
|
stroke(r);
|
|
line(i, 0, i, height);
|
|
}
|
|
}
|
|
|