Project 01- Self Portrait

This is what i look like everyday.

sketchDownload
function setup() {
    createCanvas(500, 500);
    background(250);
}

function draw() {
  //background
  strokeWeight(0);
  fill(255,0,0);
  rect(0,0, 167,500);
  fill(255,255,255);
  rect(167,0, 166,500);
  fill(0,255,0);
  rect(333,0, 167,500);
  //face color
  fill(191, 128, 111);
  //face shape
  ellipse(250, 250, 210, 272);
  //nose
  strokeWeight(1);
  stroke(0,0,0);
  arc(240,270, 10, 10, 1/2*PI, 3/2*PI);
  arc(260,270, 10, 10, 3/2*PI, 1/2*PI);
  arc(250,275, 20, 10, 0,PI);
  line(240,265, 242,240);
  //lips
  arc(235,298,30,7,PI,0);
  arc(265,298,30,7,PI,0);
  //eyebrows
  strokeWeight(0)
  fill(0,0,0);
  quad(225,197, 228,203, 185,202, 185,200);
  quad(275,203, 278,197, 315,200, 315,202);
  fill(191,128,111);
  //smile
  fill(150,0,0);
  arc(250, 300, 60, 60, 0, PI);
  //eye white
  fill(255, 255, 255);
  //eyes
  ellipse(205,225, 40, 30);
  ellipse(295,225, 40, 30);
  //eye color
  fill(95,44,22);
  ellipse(205,225, 25, 25);
  ellipse(295,225, 25, 25);
  //pupils
  fill(0,0,0);
  circle(205,225, 10);
  circle(295,225, 10);
  //sombrero
  fill(249,230,204);
  ellipse(250,145, 300,100);
  arc(250,150, 100,250,PI, 0);
  //pokeball
  fill(255,0,0);
  arc(250, 100, 75, 75, PI, 0);
  fill(255,255,255);
  arc(250,100, 75,75,0,PI,CHORD);
  fill(0,0,0);
  ellipse(250,100,30,30);
  fill(255,255,255);
  ellipse(250,100,15,15);
  //teeth
  fill(255,255,255);
  arc(225,300,10,10,0,PI);
  arc(235,300,10,10,0,PI);
  arc(245,300,10,10,0,PI);
  arc(255,300,10,10,0,PI);
  arc(265,300,10,10,0,PI);
  arc(275,300,10,10,0,PI);
  //pizza slice
  fill(255,222,111);
  triangle(250,320, 395,305, 395,390);
  fill(242,186,120);
  ellipse(395,347.5, 9,85);
  fill(155,41,23);
  circle(290,330,7);
  circle(270,325,7);
  circle(305,320,7);
  circle(325,345,7);
  circle(335,323,7);
  circle(355,344,7);
  circle(363,332,7);
  circle(378,365,7);
  circle(375,320,7);
  //lines
  strokeWeight(3);
  if(mouseIsPressed==true){
    stroke(255,255,255);
    line(0,0, mouseX,mouseY);
    stroke(0,255,0);
    line(0,500,mouseX,mouseY);
    stroke(255,0,0);
    line(500,0, mouseX,mouseY);
    stroke(255,255,255);
    line(500,500, mouseX,mouseY);
  } else {
    stroke(0,255,0);
    line(0,0, mouseX,mouseY);
    stroke(255,255,255);
    line(0,500,mouseX,mouseY);
    line(500,0, mouseX,mouseY);
    stroke(255,0,0);
    line(500,500, mouseX,mouseY);
  }
}

Leave a Reply