Skip to content

Instantly share code, notes, and snippets.

@claytical
Created September 28, 2015 21:59
Show Gist options
  • Save claytical/738fd267ff9ac79255e7 to your computer and use it in GitHub Desktop.
Save claytical/738fd267ff9ac79255e7 to your computer and use it in GitHub Desktop.
While Example
var dots = [];
function setup() {
createCanvas(windowWidth, windowHeight);
while(dots.length < 10) {
dots.push(random(10,50));
}
}
function draw() {
background(0);
noFill();
stroke(255,0,0);
var tenth = height/10;
var i = 0;
while (i < dots.length) {
ellipse(width/2, i * tenth, dots[i], dots[i]);
i = i + 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment