Skip to content

Instantly share code, notes, and snippets.

@pamelafox
Created May 18, 2018 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pamelafox/7fbb7498a6fcaa3f8b696b8c5589cce1 to your computer and use it in GitHub Desktop.
Save pamelafox/7fbb7498a6fcaa3f8b696b8c5589cce1 to your computer and use it in GitHub Desktop.
NoiseLandscape
// See documentation @ https://processing.org/reference/noise_.html
float noiseScale = 0.02;
void setup() {
size(640, 360);
}
void draw() {
background(0);
for (int x=0; x < width; x++) {
float noiseVal = noise((x)*noiseScale, noiseScale);
stroke(255, 255, 255);
line(x, noiseVal*280, x, height);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment