xxxxxxxxxx
float incX = 0.02;
float incY = 0.05;
float distance =10;
float wavesHeight = 200;
bool looping = true;
var frame = 0;
void setup() {
fullScreen();
background(0);
noiseDetail(1);
}
void draw() {
background(10, 10); // translucent background (creates trails)
//colorMode(RGB,100);
var zOff = looping?frameCount * 0.01:frame* 0.01;
background(0);
noFill();
strokeWeight(2);
colorMode(HSB);
//color c = color(0, 126, 255);
var h=125;
stroke(c);
float yOff = 0;
for (int y = -wavesHeight ; y < height+wavesHeight; y+=distance){
//c = color(noise(255), noise(255), noise(255));
// stroke(c);
h=random(255)*noise(y);
float xOff = 0;
beginShape();
for (int x = -wavesHeight; x < width; x +=distance) {
stroke(h, 250, y);
float n = noise(xOff, yOff,zOff);
var value = map(n,0,1,-wavesHeight,wavesHeight);
curveVertex(x, y+value);
xOff+=incX;
}
endShape();
yOff+=incY;
}
}
void mouseClicked() {
looping = !looping;
frame = frameCount;
}