Forked from DanieleMaselli/gist:f19b67fe54d757b3009a9a5458da63b6
Last active
November 25, 2016 14:51
-
-
Save ff6347/348ef7dbfd7f384c77c287b1bbaae304 to your computer and use it in GitHub Desktop.
One Hour of Code
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 initialOffset = 10; | |
| var offset = 25; | |
| var globalCircleSize = 15; | |
| var col = { | |
| r: 180, | |
| g: 63, | |
| b: 203 | |
| } | |
| function setup() { | |
| createCanvas(800, 800); | |
| background(0); | |
| //randomSeed(0); | |
| noStroke(); | |
| } | |
| function draw() { | |
| circleSize = globalCircleSize; | |
| col.r = random(100, 180); | |
| col.g = random(0, 63); | |
| col.b = random(0, 203); | |
| for (var y = initialOffset; y < height; y = y + offset ) { | |
| for (var x = initialOffset; x < width; x = x + offset) { | |
| fill(col.r, col.g, col.b) | |
| ellipse(x, y, circleSize, circleSize); | |
| circleSize = Math.abs(randomGaussian(5, 10)) | 0; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment