Skip to content

Instantly share code, notes, and snippets.

@DanieleMaselli
Last active November 25, 2016 11:53
Show Gist options
  • Select an option

  • Save DanieleMaselli/f19b67fe54d757b3009a9a5458da63b6 to your computer and use it in GitHub Desktop.

Select an option

Save DanieleMaselli/f19b67fe54d757b3009a9a5458da63b6 to your computer and use it in GitHub Desktop.
One Hour of Code
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);
}
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