var img;
var pixelSize = 5;
var pixelX;
var pixelY;
function preload(){
img = loadImage("http://i.imgur.com/oTBE2k6.jpg");
img.width = 600;
img.height = 600;
frameRate(200);
}
function setup() {
createCanvas(600, 600);
background(0);
imageMode(CENTER);
img.resize(600,600);
img.loadPixels();
}
function draw() {
noStroke();
pixelX = floor(random(width));
pixelY = floor(random(height));
var pixelGET = img.get(pixelX,pixelY);
fill(pixelGET,100);
rect(pixelX,pixelY,5,5);
}
I used a photo of me, my twin sister and my younger brother from when we were younger. Here are some progress images:
Here is the final thing (or close to the final, there are still some gaps here and there):