Created
May 18, 2018 17:08
-
-
Save pamelafox/7fbb7498a6fcaa3f8b696b8c5589cce1 to your computer and use it in GitHub Desktop.
NoiseLandscape
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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