nick34992
4/19/2016 - 3:57 PM

Ellipse Number Array. Using p5.js library.

Ellipse Number Array. Using p5.js library.

// featured in one of Shiffman's video tutorials
var nums = [100, 25, 46, 72];

function setup() {
  createCanvas(500, 400);
}

function draw() {
  background(0);
  stroke(255);
  frameRate(1);
  fill(random(255));
  for (var i = 0; i < 4; i++) {
    ellipse(i * 100 + 100, 200, nums[i], nums[i]);
  }
}