Initial Commit

This commit is contained in:
plane000
2018-04-20 10:15:15 +01:00
parent 49150ccfe4
commit 62101e8e61
2870 changed files with 520122 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
/**
* Double Random
* by Ira Greenberg.
*
* Using two random() calls and the point() function
* to create an irregular sawtooth line.
*/
int totalPts = 300;
float steps = totalPts + 1;
void setup() {
size(640, 360);
stroke(255);
frameRate(1);
}
void draw() {
background(0);
float rand = 0;
for (int i = 1; i < steps; i++) {
point( (width/steps) * i, (height/2) + random(-rand, rand) );
rand += random(-5, 5);
}
}