class SampleNoise{ float xoff; float yoff; float setxoff; float xlimit,setxlimit; float ylimit; float xc, sxc; float x; float[] xoffArray; SampleNoise(float x_){ xlimit = x_; xc = 0; } void genNoise(){ xoff = (2*noise(xc)-1)*xlimit; yoff = noise(0.05+xc)*ylimit; xc +=0.01; if(xc> 50){ xc = 0; } } } /////////////////////////////////////// class GenNoise{ float xoff; float yoff; float setxoff; float xlimit,setxlimit; float ylimit; float xc, sxc; float x; float[] xoffArray; GenNoise(float x_){ xlimit = 50; setxlimit = 20; //ylimit = 50; xc = 0; sxc = 0; x = x_; float xx = map(x, 0, sw, 0 , 90); xlimit = 100-xx; xoffArray = new float[sw/10]; } void genNoise(){ xoff = (2*noise(xc)-1)*xlimit; yoff = noise(0.05+xc)*ylimit; xc +=0.01; for(int i=0; i0){ setxoff = 0;//(setxlimit-sxc)*random(-1,1); sxc +=0.2; }else{ setxoff = 0; } if(xc> 50){ xc = 0; sxc =0; } } }