Perlin Wave

Processing sketch, found on an old computer, think it was adapted from code found online but it's here for posterity.


float noiseScale = 0.018F;
float n = 0.0F;
float speed = 0.4F;
int frameCount = 0;

void setup(){
     size(600, 300);
     frameRate(30);
}

void draw(){
  background(255);

  n += speed;

  for (int i = 0; i < 60; i++){
    for (int j = 0; j < 300; j++){
      float f = noise((n + j) * noiseScale, (-n + i) * noiseScale, i * noiseScale);
      float grey = map((200.0F - f * 250.0F), 60, 140, 0, 200);
      stroke(grey, 120);
      pushMatrix();
      scale(2,2);
      point(j * 2, f * 150);
      popMatrix();
    }
  }
}