Monica Chang – Project – 09 – Portrait

sketch

//Monica Chang
//mjchang@andrew.cmu.edu
//Section D
//Project 09 - Computational Portrait

function preload() {
    var myImageURL = "https://i.imgur.com/3WVgXfE.jpg";
    itMe = loadImage(myImageURL); //uploading my image
}


function setup() {
    createCanvas(360, 480);
    background(0);
    itMe.loadPixels(); //pixelates the image
    frameRate(4000); // rate of generating pixels
}

function draw() {
    var px = random(width);
    var py = random(height);
    var size = random(3, 8);
    var offset = 15;

    var cx = constrain(floor(px), 0, width-1);
    var cy = constrain(floor(py), 0, height-1);
    var imgColor = itMe.get(cx, cy);

    noStroke();
    fill(imgColor);
    ellipse(px, py, size);
    textSize(size);
    textFont("Georgia");
    text("M", px + offset, py);
}

Original Image of myself. Self-Portrait.
Mid-drawing of computational portrait.

I chose to approach this project with a self-portrait.

I think this was one of the easiest but one of the more fun projects we have done this semester. Just like all the other projects, this was very open-ended which allowed me to explore different options comfortably although I struggled to find what else I could do to the image. This also gave me a chance to look at some beautiful photos I had abandoned.

Leave a Reply