//Julianna Bolivar
//jbolivar@andrew.cmu.edu
//Section D
//Computational Portrait
var img;
function preload(){
//load image
img = loadImage("https://i.imgur.com/eaETdlz.png");
frameRate(10);
}
function setup() {
createCanvas(400, 400);
}
function draw() {
image(img, 0, 0, 400, 400);
for(var row = 0; row <= 200; row++) {
for(var col = 0; col <= 200; col++){
var x = col * 5;
var y = row * 5;
//pixels
var pixelColor = img.get(x*5, y*5);
noStroke();
fill(pixelColor);
//draw circle
circle(x + 30, y + 50, 5);
}
}
}
I didn’t expect my frame in frame pixels to create a distorted effect, but I really like how it looks. The spaces in between the circles allow you to see some of the original image underneath.