Sheenu-Project 09-Portrait

sketch

// Portrait
// Name: Sheenu You
// Andrew ID: sheenuy
// Section E

//Variables
var sheenu;
var a =0;
var b =0;
//Loads Image
function preload() {
    var myImageURL = "https://i.imgur.com/JCe4MPY.jpg";
    sheenu = loadImage(myImageURL);
}

function setup() {
    createCanvas(480, 480);
    background(0);
    //Load Pixels of image
    sheenu.loadPixels();
    frameRate(120);
}

function draw() {
    //Variables that generate Image
    var x = random(width);
    var y = random(height);
    //Gets all those pixels and arranges into variable
    //Generates "Sheenu" pixel
    var image = sheenu.get(x, y);
    fill(image);
    textSize(7);
    text("Sheenu",x, y);
    //Generates random "You" pixel
    text("You",a,b)
    //"You" pixel genereator
  a += 20;
  if (a > width) {
    a = 0;
    b += 20;
  }



}

I wanted to do something with text, so I decided to use my name as a custom pixel. I guess you can say this portrait has my name (and face) all over it. I like how the text starts to appear like brush strokes or pastel as more text generates and creates the full image. I found it as an interesting effect I wasn’t aware of nor expecting. I also wanted to do something with my last name, so I made them generate in an orderly fashion but with randomly generated colors. The “You” is definitely a huge contrast compared to the “Sheenu”, which generates randomly and has a specifically generated fill. In the end, all I can say is that a picture is truly worth a thousand words (or names).

Author: Sheenu You

Choo choo

Leave a Reply