float [] xp = new float[0]; float [] yp = new float[0]; int numObjects = 0; int tol2 = 15; void setup(){ size(300,300); xp = append(xp,random(10,width-10)); yp = append(yp,random(10,height-10)); } void draw(){ background(255); for(int i=0; iwidth-10 || xrand<1 || yrand >height-10 || yrand<1) overlap = true; } if(overlap==false){ xp = append(xp,xrand); yp = append(yp,yrand); tol2 = 15; break; } k++; if(k>1000){ //println(xp.length + " impass"); tol2+=10; break; } } //println(numObjects++); //save("stoch"+nf(numObjects,2)+".jpg"); }