mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
adding basics folder to the android dist
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Double Random
|
||||
* by Ira Greenberg.
|
||||
*
|
||||
* Using two random() calls and the point() function
|
||||
* to create an irregular sawtooth line.
|
||||
*/
|
||||
|
||||
size(200, 200);
|
||||
background(0);
|
||||
int totalPts = 300;
|
||||
float steps = totalPts + 1;
|
||||
stroke(255);
|
||||
float rand = 0;
|
||||
|
||||
for (int i = 1; i < steps; i++){
|
||||
point( (width/steps) * i, (height/2) + random(-rand, rand) );
|
||||
rand += random(-5, 5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user