Skip to content

Instantly share code, notes, and snippets.

@nick3499
Created April 19, 2016 15:00
Show Gist options
  • Select an option

  • Save nick3499/4241df5e8816225079d7ac7a6d5d2c42 to your computer and use it in GitHub Desktop.

Select an option

Save nick3499/4241df5e8816225079d7ac7a6d5d2c42 to your computer and use it in GitHub Desktop.
Array. Using p5.library.
var nums = [600, 500, 400, 300, 200, 100];
function setup() {
createCanvas(648, 648);
}
function draw() {
background(random(85, 170), random(85, 170), random(85, 170));
stroke(random(85, 170), random(85, 170), random(85, 170), 100);
strokeWeight(60);
for (i = 0; i < 6; i++) {
fill(random(85, 170), random(85, 170), random(85, 170));
ellipse(100 * i, 324, nums[i], nums[i]);
}
// frame rate may be set to a higher value depending upon graphics performance
frameRate(5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment