// animated perlin clouds // use random start position in the 3d noise space // once initialised, perlin noise has defined fixed values at every coordinate // so by moving through the space, we can create animations float yoff=random(1000); float xoff=random(1000); float zoff=0; float xyScale=0.01f; // constants for the cloud filter float CLOUD_COVER = 0.55f; float CLOUD_SHARPNESS = 0.93f; void setup() { size(200,200); noiseDetail(8); } void loop() { // move slowly through the noise space // use mouse to steer xoff+=((width/2)-mouseX)*0.001; yoff+=((height/2)-mouseY)*0.001; // always move forward zoff+=0.05; // var to store noise value int nV; // reset index in pixel buffer int index=0; // used for speed optimisation float currYOff; for(int y=0; y