Self Portrait – Daniel Basurto

CONCEPT

I wanted to create a self-portrait based on my current self with basic shapes and colors.

CODE

The code consists of simple shapes and lines in order to form the picture. The biggest challenge with coding was my lack of knowledge as this is my first time doing so. It took a long time to understand how the coordinates and positions work but eventually I managed to pull through.  

I created a grid to find myself on the canvas, as well as doubling it as a background by lowering the thickness of the stroke.

function setup() {
  createCanvas(400, 450);
}

function draw() {
  background(84, 202, 108);
  
  // Grid for helping with locating myself and background //
  strokeWeight(.1) //added at the end to make seem more like a background //
  line(0, 50, 1000, 50);
  line(0, 100,1000,100);
  line(0,150,1000,150);
  line(0,200,1000,200);
  line(0,250,1000,250);
  line(0,300,1000,300);
  line(0,350,1000,350);
  line(0,400,1000,400);
  line(50,0,50,1000)
  line(100,0,100,1000)
  line(150,0,150,10000)
  line(200,0,200,1000)
  line(250,0,250,1000);
  line(300,0,300,1000);
  line(350,0,350,1000);
  line(400,0,400,1000)
  

  // Hair color and shape//
  strokeWeight(1) // make the strokes thick again //
  fill (0)
  ellipse(200, 200, 275, 350)
  ellipse(100, 300, 60, 100)
  ellipse(300, 300, 60, 100)
  ellipse(125, 325, 70, 100)
  ellipse(160, 325, 70, 100)
  ellipse(250, 325, 70, 100)
  ellipse(260, 325, 70, 100)
  
  // Face, nose, ears, mouth and neck //
  fill(225, 172, 149)
  rect(165, 325, 75, 75)
  ellipse(85, 200, 50, 100) ;
  ellipse(315, 200, 50, 100) 
  ellipse(200, 200, 250, 290)
  arc(200, 215, 30, 20, 10, PI);
  arc(200, 250, 80, 80, 0, PI);
 
  // Eyes //
  fill(255, 255, 255)
  ellipse(150, 150, 50, 75)
  ellipse(250, 150, 50, 75)
  
  // Pupils //
  fill(56, 16, 28)
  ellipse(150,150,20,30)
  ellipse(250,150,20,30)
  
 // torso, shoulders and shirt //
  fill(246, 133, 211)
  rect(45, 400, 100, 100)  
  rect(260, 400, 100, 100)
  rect(75, 375, 250, 250);
  
  //shirt lines //
  fill(0)
  line(125, 375, 200, 450)
  line(275, 375, 200, 450)
}

 

COMPLETED SELF PORTRAIT

 

REFLECTION/FUTURE WORK

This portrait shows my lack of familiarity with coding and creativity due to said lack of experience. In the future I would like to learn how to apply the concepts discussed in class better. Hopefully add some animations in the future. Maybe add text and more complex figures later haha!

One thought on “Self Portrait – Daniel Basurto”

Leave a Reply