Original by Daniel Shiffman, embedded using Javascript by John Resig, modified to use IDL example data by Michael Galloy
Mouse horizontal location inside image controls size of dots. Creates a simple pointillist effect using ellipses colored according to pixels in an image.
PImage a;
void setup()
{
a = loadImage("people.jpg");
size(256,256);
noStroke();
background(255);
smooth();
}
void draw()
{
float pointillize = map(mouseX, 0, width, 2, 18);
int x = int(random(a.width));
int y = int(random(a.height));
color pix = a.get(x, y);
fill(pix, 126);
ellipse(x, y, pointillize, pointillize);
}