Project-09-Portrait

sketch
let foto;

function preload() {
  foto = loadImage('https://i.imgur.com/3x32MS3.jpg?1'); //load image
  tak = ["dickson"] //establish text
  print(tak) 
}

function setup() {
  createCanvas(480, 480);
  imageMode(CENTER); 
  noStroke();
  background(240);
  foto.loadPixels();
}

function draw() {
  let x = floor(random(foto.width)); //randomizing where text pops up
  let y = floor(random(foto.height));
  let pic = foto.get(x, y); 
  fill(pic, 128); //setting color to match the photo
  textSize(mouseX/30) //adjustable text size
  text(tak,x,y)

}

function mousePressed() {
    filter(GRAY) //click to turn photo black and white
}

I thought it would be interesting to literally build myself with my name. This strongly resembles my identity through my name and my face. With each click, color is drawn away from the drawing to slowly resemble me as just a face and less of a person.

Leave a Reply