//Steph Chun
//15-104 section #A
//heeseoc@andrew.cmu.edu
//Project-09
var img;
// load image
function preload() {
var imageurl = "https://i.imgur.com/jYztupF.jpg";
img = loadImage(imageurl);
}
function setup() {
createCanvas(500, 500);
background(0);
img.loadPixels();
frameRate(20);
}
function draw() {
//array for the letters that comes up in random sizes and position
//which spells out the name of my roomate in order
var name = [];
name[0] = "j";
name[1] = "o";
name[2] = "o";
name[3] = "h";
name[4] = "e";
name[5] = "e";
//the position of the letters
var x = random(width);
var y = random(height);
//assigning colors to the letters according to the pixel of the image
var ix = constrain(floor(x), 0, width-1);
var iy = constrain(floor(y), 0, height-1);
var dotcolor = img.get(ix, iy);
//letters of random sizes that shows up constantly
noStroke();
fill(dotcolor);
textSize(random(10, 30));
text(name[frameCount%6], x, y);
//text that follows the mouse
var mousecolor = img.get(mouseX, mouseY);
fill(mousecolor);
textSize(10);
text("I don't know man", mouseX, mouseY);
}
I made a portrait of my roommate, Joohee, out of the letters of alphabet in her name and the phrase that she uses a lot. I wanted to somewhat capture her personality through this project, by the photo I chose and the text in a more minimal way. Below are the original photo and different experiments that I’ve done, only with text.