Ravine of Noise

This is a program i created in processing that uses perlin noise to generate a cave like structure.

float xOffset = 0;
float xOffsetChangeSpeed = 0.1;
float yOffset = 0;
float yOffsetDiffSpeed = 1;
float yOffsetChangeSpeed = 0.1;
float halfHeight = height/2;

void setup() {
  size(960, 640);
  frameRate(30);
  colorMode(HSB, 360, 100, 100);
  halfHeight = height/2;
  
}

void draw() {
  background(300);
  float weight = 100;
  boolean colorB = false;
  yOffset = yOffset - (10*yOffsetDiffSpeed);
  for (int i = 9; i >= 0; i--) {
    fill(color(0, 0, 100 * ((float)i / 9)));
    drawTwinCurve(weight , i * 30);
    yOffset+=yOffsetDiffSpeed;
    colorB = !colorB;
  }
  yOffset += yOffsetChangeSpeed;
  xOffset += xOffsetChangeSpeed;
}

float getNoise(float x, float offset) {
  return noise((x*xOffsetChangeSpeed)+(offset*xOffsetChangeSpeed) + xOffset, yOffset);
}

void drawTwinCurve(float weight, float offset) {
  beginShape();
  for (int x = -2; x <= width + 2; x++) {
    curveVertex(x, halfHeight + getNoise(x, 0) / 2 * weight + offset);
  }
  for (int x = width + 2; x >= -2; x--) {
    curveVertex(x, halfHeight - getNoise(x, 0) / 2 * weight - offset);
  }
  endShape();
}