dchikows – Section C – Project-05-Wallpaper

sketch

// David Chikowski
// Section C
// dchikows@andrew.cmu.edu
// Project - 05



function setup() {
    createCanvas(480, 480);
    background(240, 190, 0);
    angleMode(DEGREES);
    
    //top left
    draw_clover();
   
    //top middle
    translate(100, 10);
    draw_clover();

    //top right
    translate(100, 40);
    draw_clover();

    //bottom left
    translate(-400, 0);
    draw_clover();

    //bottom middle
    translate(100, 10);
    draw_clover();
  
    //bottom right
    translate(100, 40);
    draw_clover();

}

function draw_clover() {
    noStroke();
    fill(140,210,0);
    
    translate(0,20);

//left leaves 
    ellipse(50,50,40,25);
    push();
    translate(50,50);
    rotate(-30);
    ellipse(-2,6,40,25);
    pop();

// right leaves 
    translate(40,50); 
    push();
    translate(50,0);
    rotate(30);
    ellipse(2,6,40,25);
    pop();
    ellipse(50,0,40,25);

//top leaves
    translate(27,-22);
    push();
    translate(0,0);
    rotate(30);
    ellipse(10,-5,25,40);
    pop();
    ellipse(0,0,25,40);

//stem
    stroke(0,200,0);
    strokeWeight(4);
    noFill();
    curve(45,40, 20,60, 5, 20, 50,30);

}

I originally started the project with the intent to do lines that related to each other on a grid through variables. Although I realized I wanted to make something more organic so I changed my idea. I then constructed a three leaf clover which I repeated in a pattern on my code. I was going to use a four loop, but I did not account for this early enough in my code so I ended up translate the clover. I learned that for next to

Leave a Reply