// Sketch to illustrate the differences // between random() and noise() // // First run the sketch as is to show the randomness // in the lines that result. Adjust the loop increment to i += 2 // to see better. // // Next comment the line(0 with random() and // uncomment the lines that use noise() // run it a few times. // // Next, vary the delta: make it 0.0 or 0.5 to get more randomness // Make delta very small, 0.005 to get more natural contours float t; float delta; void setup() { size(500, 500); smooth(); background(255); noLoop(); // set up noise parameters t = 0; delta = 0.1; } // setup() void draw() { stroke(52, 5, 5); for (int i=0; i