Self-Portrait

Portrait
function setup() {
    createCanvas(800,600);
    background(0);

}

function draw() {
    //reference grid
      stroke(80,80,80,10)
      line(0,100,799,100);
      line(0,200,799,200);
      line(0,300,799,300);
      line(0,400,799,400);
      line(0,500,799,500); // x grid lines
      line(200,0,200,599);
      line(400,0,400,599);
      line(600,0,600,599); // y grid lines
      noLoop();

    //background
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(100,50,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(100,150,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(100,250,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(100,350,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(100,450,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(100,550,50,50);

      fill(random(0,225),random(0,225),random(0,225));
        ellipse(700,50,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(700,150,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(700,250,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(700,350,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(700,450,50,50);
      fill(random(0,225),random(0,225),random(0,225));
        ellipse(700,550,50,50);

      fill(random(0,225),random(0,225),random(0,225));
          ellipse(300,50,50,50);
      fill(random(0,225),random(0,225),random(0,225));
          ellipse(500,50,50,50);

    //body
      fill(255,255,245);
      rect(200,430,400,300,90);
      fill(235,235,235);
      quad(275,430,370,470,350,410,280,420)
      quad(800-275,430,800-370,470,800-350,410,800-280,420)
      fill(20,20,20);
      line(290,510,290,599);
      line(510,510,510,599);
      textSize(15);
      text('15104',460,520);

    //headshape
      loop();
      fill(253, 211, 159);
      ellipse(400,300,270,300);
      stroke(0,0,0);
      strokeWeight(2);

    //nose
      stroke(0,0,0);
      strokeWeight(4)
      line(400,280,410,325);
      line(410,325,395,335);
      arc(390,335,10,5,PI,0);
      arc(400,335,7,3,PI,0);


    //mouth
      fill(0,0,0)
      noStroke();
      arc(390,380,60,35,0,PI);
      fill(255,255,255);
      arc(390,380,45,20,0,PI);

    //eyebrows
      fill(0,0,0)
      quad(315,280,370,270,360,260,325,268);
      quad(800-315,280,800-370,270,800-360,260,800-325,268);

    //eyes
      ellipse(340,280,30);
      ellipse(800-340,280,30);

    //glasses
      noFill();
      stroke(104,63,18);
      ellipse(340,280,80);
      ellipse(800-340,280,80);
      arc(400,290,40,15,PI,0)

    //hat
      fill(42,79,109);
      noStroke();
      arc(400,260,260,220,PI,0);
      fill(34,29,59,100);
      rect(273,230,255,30);
      fill(34,29,59);
      ellipse(400,150,20,20);

}

Leave a Reply