int distance = width/4;
for(int i=0;distance>2;i++){
int popCount=0;
int walkCount=0;
for(int j=0;j<n;j++){
if(poke(j,distance)){
walkCount++;
} else {
if(pop && poke(j,0))
popCount++;
}
}
draw(cPoints,true);
if(debugOutput)
System.out.println(i + ": walk=" + (walkCount/(float)n) + ", pop=" + (popCount/(float)n) +", dist=" + distance);
if(saveFrames){
String f = ""+frames++;
while(f.length()<5)
f = "0" + f;
ImageIO.write(img, "png", new File(filename + "_" + f + ".png"));