Februar 22, 2012
![](../../../../files/2012/02/visual_pointillism.jpg)
![](../../../../files/2012/02/pointillism3.jpg)
![](../../../../files/2012/02/pointillism2.jpg)
![](../../../../files/2012/02/pointillism1.jpg)
Processing
PImage img; import processing.opengl.*; int pointWidthMin = 6; int pointWidthMax = 24; int counter=1; void setup() { img = loadImage("henry.jpg"); background(204); smooth(); size(img.width,img.height,OPENGL); } void draw() { if (pointWidthMax>pointWidthMin*3) pointWidthMax = (width*height)/(counter*5); int x = int(random(img.width)); int y = int(random(img.height)); int loc = x + y * img.width; // location pixel in pixel array // read rgb img.loadPixels(); // only float r = red(img.pixels[loc]); float g = green(img.pixels[loc]); float b = blue(img.pixels[loc]); noStroke(); fill(r,g,b,180); float hrz = random(pointWidthMin,pointWidthMax); ellipse(x,y,hrz,hrz); counter++; } void keyPressed() { switch(key) { case 'p': save("screens/points_"+year()+"-"+month()+"-"+day()+"_"+hour()+"-"+minute()+"-"+second()); break; default: break; } // switch }