# Project 09 – Sara Frankel

``````// Sara Frankel
// sfrankel
// Project 09 Portrait
// section A

var underlyingImage; //variable to help display the image being shown
var circx = 0; //circle starting position is 0,0
var circy = 0;

var myImageURL = "https://i.imgur.com/a3mX8Atl.jpg";
}

function setup() {
createCanvas(480, 480);
background(0);
frameRate(10);
}

function draw() {
var px = random(width);
var py = random(height);
var ix = constrain(floor(px), 0, width-1);
var iy = constrain(floor(py), 0, height-1);
var theColorAtLocationXY = underlyingImage.get(ix, iy);

//strokeWeight(5);
fill(theColorAtLocationXY);
text("twins", px, py);//inserts text randomly to draw the image

if (mouseIsPressed) {
var theColorAtPos = underlyingImage.get(circx, circy);
fill(theColorAtPos);
ellipse(circx, circy, 5, 5); //draws ellipse at circx and circy
circx = (circx + 5) % width; //increments circx accross the row and goes back to 0 when it reaches width
if (circx === 0) {
circy += 5;// when circx reaches width, circy will increment
}
}

}
``````

I chose to upload a picture of my sister and I. Being a fraternal twin, most of the time people do not believe or suspect that we are twins. At times, this can be quite fun to point out to people, but most of the time it is not. So I thought it would be ironic to use this picture of us in elementary school in such an abstract image that legitimately spells and draws out the truth with the text and circles. As when you press the canvas, ellipses will be drawn to almost “clearly” draw it out for you.

Here is the original picture.

Here is a final image shot.