xxxxxxxxxx
var start=0;
var inc=0.05;
var yoff=0;
function setup() {
createCanvas(400,400);
frameRate(10);
}
function draw() {
background(51);
stroke(255);
noFill();
beginShape();
var xoff=start;
for(var x=0;x<width;x+=1){
var n =map(noise(xoff),0,1,-50,50);
var s =map(sin(xoff),-1,1,0,height);
var y = s+n;
vertex(x,y);
xoff+=0.01;
}
endShape();
//noLoop();
start+=inc;
//var x= xoff;
//var y= map(noise(yoff),0,1,0,height);
//ellipse(x,y,10);
//xoff+=0.3;
//yoff+=0.001;
}