Project 1 : Self Portrait

Week 1

sketch-self portraitDownload
function setup() {
  createCanvas(650, 650);
}

function draw() {
  background(107,116,145);
  
  //hair
  fill(132, 117, 82);
  noStroke();
  beginShape();
  curveVertex(width/2-140,290);
  curveVertex(width/2-130,230);
  curveVertex(width/2-120,350);
  curveVertex(width/2-130,550);
  curveVertex(width/2+130,550);
  curveVertex(width/2+120,350);
  curveVertex(width/2+140,250);
  endShape(CLOSE);
  
  //main body
  fill(247, 194, 150);
  noStroke();
  beginShape();
  vertex(width/2-35, 390);
  vertex(width/2-35, 430);
  vertex(150, 470);
  vertex(100, 550);
  vertex(100, 650);
  vertex(550, 650);
  vertex(550, 550);
  vertex(500, 470);
  vertex(width/2+35, 430);
  vertex(width/2+35, 390);
  endShape(CLOSE);
  
  //face
  fill(247, 194, 150);
  noStroke();
  ellipse(width/2,240,250,320)
  //ears
  ellipse(width/2-110,320,20,40)
  ellipse(width/2+110,320,20,40)
  
  
 //hats
  fill(0);
  noStroke();
  beginShape();
  curveVertex(width/2-200,300);
  curveVertex(width/2-200,320);
  curveVertex(width/2-100,100);
  curveVertex(width/2,50);
  curveVertex(width/2+100,100);
  curveVertex(width/2+200,320);
  curveVertex(width/2+200,300);
  endShape();
  
  
  //lips
  fill(190,111,82);
  noStroke();
  beginShape();
  curveVertex(width/2-35,350);
  curveVertex(width/2-30,360);
  curveVertex(width/2,370);
  curveVertex(width/2+30,360);
  curveVertex(width/2+35,350);
  endShape();
  
  beginShape();
  curveVertex(width/2-35,370);
  curveVertex(width/2-30,360);
  curveVertex(width/2,355);
  curveVertex(width/2+30,360);
  curveVertex(width/2+35,370);
  endShape();
  
  //nose
  fill(239, 217, 192);
  noStroke();
  beginShape();
  vertex(width/2-8, 320);
  vertex(width/2-10, 335);
  vertex(width/2+10, 335);
  vertex(width/2+8, 320);
  endShape(CLOSE);
  noLoop();
  
  fill(239, 217, 192);
  noStroke();
  beginShape();
  curveVertex(width/2-10, 335);
  curveVertex(width/2-10, 335);
  curveVertex(width/2, 340);
  curveVertex(width/2+10, 335);
  curveVertex(width/2+10, 335);
  endShape();
  
  //garment with transparency
  fill(150,190);
  stroke(220);
  strokeWeight(3);
  beginShape();
  curveVertex(width/2-45,405);
  curveVertex(width/2-35,425);
  curveVertex(width/2-57,435);
  curveVertex(150, 460);
  curveVertex(100, 550);
  curveVertex(120, 650);
  curveVertex(520, 650);
  curveVertex(550, 550);
  curveVertex(500, 460);
  curveVertex(width/2+57,435);
  curveVertex(width/2+35,425);
  curveVertex(width/2+45,405);
  endShape(CLOSE);

  //garment on top layer
  fill(250);
  noStroke();
  beginShape();
  vertex(width/2,610)
  vertex(width/2-50,430)
  vertex(width/2-170,430)
  vertex(width/2-180,470)
  vertex(width/2-180,650)
  vertex(width/2+180,650)
  vertex(width/2+180,470)
  vertex(width/2+170,430)
  vertex(width/2+50,430)
  endShape();
  
  //accessories*line
  stroke(2);
  strokeWeight(1);
  strokeCap(SQUARE);
  line(width/2-110,330,width/2-110,385);
  line(width/2+110,330,width/2+110,385);
  noLoop();
  
  fill(249,239,80);//the spherical structure
  ellipse(width/2-110,385,50,50);
  ellipse(width/2+110,385,50,50);
  
  
  }
  
  
 

Leave a Reply