// http://www.processing.org/reference/noise_.html // // Returns the Perlin noise value at specified coordinates. // Perlin noise is a random sequence generator producing a more natural, // harmonic succession of numbers than that of the standard random() function. // It was invented by Ken Perlin in the 1980s and has been used // in graphical applications to generate procedural textures, shapes, // terrains, and other seemingly organic forms. // float noiseScale=0.02; void setup() { size(400, 300); } void draw() { background(0); for (int x=0; x < width; x++) { float noiseVal = noise((mouseX+x)*noiseScale, mouseY*noiseScale); stroke(noiseVal*255); line(x, mouseY+noiseVal*80, x, height); } }