Skip to content

Instantly share code, notes, and snippets.

@DanieleMaselli
Created November 19, 2016 19:40
Show Gist options
  • Select an option

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

Select an option

Save DanieleMaselli/dfc0dca4f63547d195554909d0fc231b to your computer and use it in GitHub Desktop.
function setup() {
createCanvas(800, 800);
colorMode(HSB);
background(196, 37, 90);
}
var initialOffset = 10;
var offset = 25;
var globalCircleSize = 15;
var reductionPercent = 5; // %
function draw() {
noStroke();
circleSize = globalCircleSize;
for(var y = initialOffset; y < height; y = y + offset ){
for(var x = initialOffset; x < width; x = x + offset){
ellipse(x, y, circleSize, circleSize);
}
circleSize = circleSize * 0.95;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment