var portraitPhoto; // variable to store the photo link
var colorAtPixel; // variable to store the color
var ellipseSize = 20; // variable to store the ellipse size
function preload(){
portraitPhoto = loadImage("http://i.imgur.com/sn5iIEZ.jpg"); //load in the portrait photo
}
function setup() {
createCanvas(800,800); // create a canvas at the photo's dimensions
portraitPhoto.loadPixels(); // load in the pixels for the photo
}
function draw() {
background(255);// draw in a background
noStroke(); // no strokes around shapes
for(var r = 0;r<=width+1;r+=ellipseSize){ // go through all the rows of pixels
for(var c = 0;c<=height+1;c+=ellipseSize){ // go through all the columns of pixels
colorAtPixel = portraitPhoto.get(r,c); // check what the color is in the photo
fill (colorAtPixel); // fill it with that color
ellipse(r,c,ellipseSize,ellipseSize); // draw a circle
}
}
noLoop();//just run draw once
}
I was very intrigued by the work of Danny Rozin, and how just that simple repetition of shapes could still manage to convey human features – but I wanted to work with color, not with shadows. So I tried to develop something that is in keeping with the simplicity of Rozin’s style, but incorporates colors to make the portrait more recognizably human.