// loads an binary image and convert it to dots // Author: Baris Evrim Demiroz b.evrim[at]gmail.com PImage src,dst; int wSize=7; //window size, should be even float t=0.5; //threshold value for window fill ratio int total; int i,j,k,m; color c = color(90,90,180); void setup(){ size(450,223); src = loadImage("dunya.gif"); smooth(); fill(c); stroke(c); framerate(10); loop(); } void draw(){ if(mousePressed){ image(src,0,0); } else{ background(50); for(i=0; i= t ) ellipse(j+wSize/2, i+wSize/2, wSize/2, wSize/2); } } } }