Project 1: My Self Portrait

sketchDownload
function setup() {
    createCanvas(600, 900);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
}


function draw() {
  
//hair 

  stroke(0,0,0);
  fill(0,0,0);
  ellipse(300,450,350,400);
  rect(130,450,340,230);
  quad(130,450,130,700,470,450,470,700);
  stroke(193,134,14);
  fill(193,134,14);
  rect(240,600,120,100); 
    
//face in general

  stroke(193,134,14);
  fill(193,134,14);
  ellipse(300,450,275,350);
  stroke(235,163,20);
  fill(235,163,20);
  ellipse(300,450,230,350);
  triangle(300,250,290,280,310,280);
  stroke(193,134,14);
  strokeWeight(7);
  arc(300,600,50,15,PI,0);
  noFill();
  strokeWeight(2);
  fill(255,255,255);
  

//features

  //eyes
  ellipse(240,400,60,25);
  ellipse(360,400,60,25); 
  fill(77,53,6);
  circle(240,400,25);
  circle(360,400,25);
  fill(0,0,0);
  circle(240,400,15);
  circle(360,400,15);
  fill(255,255,255);
  stroke(255,255,255);
  rect(240,400,3,3);
  rect(360,400,3,3);
  stroke(193,134,14);
  
  //eyebrows
  stroke(0,0,0);
  strokeWeight(8);
  line(330,380,360,370);
  line(330,375,360,365);
  line(330,370,360,360);
  line(360,370,400,385);
  line(360,360,400,385);
  line(330,380,330,370);
  
  line(270,380,240,370);
  line(270,375,240,365);
  line(270,370,240,360);
  line(240,370,200,380);
  line(240,360,200,380);
  line(270,380,270,370);
  strokeWeight(2);
  stroke(193,134,14);
  
  //nose
  strokeWeight(6);
  line(290,410,285,470);
  fill(235,163,20);
  ellipse(300,470,30,20);
  stroke(193,134,14);
  line(285,470,275,490);
  line(315,470,325,490);
  fill(137,100,14);
  ellipse(285,490,20,10);
  ellipse(315,490,20,10);
  fill(193,134,14);
  rect(295,490,10,30);
  fill(255,255,255);
  strokeWeight(2);
  
  //lips
  stroke(195,12,67);
  strokeWeight(12);
  line(295,520,255,530);
  line(305,520,345,530);
  stroke(152,7,50);
  strokeWeight(16);
  line(262,532,338,532);
  line(270,538,330,538);
  stroke(195,12,67);
  strokeWeight(12);
  line(255,530,285,550);
  line(345,530,315,550);
  line(285,550,315,550);
  strokeWeight (2);
  stroke(137,100,14);


}

Leave a Reply