-
-
Save ff6347/afb81df947a3ecf7c05d07e9d2943220 to your computer and use it in GitHub Desktop.
Hour-of-Code_Color_JP
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
| var a = 0; | |
| var b = 0; | |
| var c = 0; | |
| function setup() { | |
| createCanvas(500, 500); | |
| background(255); | |
| noStroke(); | |
| colorMode(HSB); | |
| var s = random(440, 450); | |
| noiseSeed(s); | |
| a = noise(s); | |
| b = noise(s); | |
| var xs = a; | |
| for (var x = 0; x <= width; x++) { | |
| b += 0.01; | |
| c += 0.0005; | |
| a = xs; | |
| for (var y = 0; y <= height; y++) { | |
| a += 0.005; | |
| var h = noise(a, b, c)*10; | |
| fill(255/h*3, 255, 255); | |
| rect(x*5, y*5, h, h); | |
| } | |
| } | |
| //print(n) | |
| //print(h) | |
| } | |
| function draw() { | |
| } | |
| function mousePressed(){ | |
| save('image.jpg'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment