Bhaboo’s Project 5

sketchDownload
//Bhavesh Patel
//Section B
//bhaveshp@andrew.cmu.edu
//Project-05 - Abstract Art as Wallpaper

function setup() {
    createCanvas(480, 500);
    background(251, 244, 225);
    noLoop();
}
 
function draw() {

    noStroke(); 
    noLoop();
    for (var b = 50; b < height; b += 100) {
        for (var a = 30; a < width-20; a += 50) {
          circle(a, b, 45); //red circles
          fill(200, 0, 54, 170) 
        }
    } 
    for (var b = 40; b < height; b += 100) {
        for (var a = 27; a < width-20; a += 50) {
          rect(a, b, 20, 30); //green rectangle
          fill(0, 200, 54, 170) 
        }
    }
    for (var b = 40; b < height; b += 100) {
        for (var a = 27; a < width-20; a += 50) {
          circle(a, b, 20); //blue circle
          fill(0, 54, 200, 170) 
        }
    }
    for (var b = 55; b < height; b += 100) {
        for (var a = 20; a < width-20; a += 50) {
          rect(a, b, 20, 10); //purple rectangle
          fill(100, 100, 200, 200) 
        }
    }
    noLoop();
}

Leave a Reply