String logfilecut [] = new String [10]; float floatsonly [] = new float [10]; int numberofloops = 0; int trackmyprogress =0; int k=0; int stopper =1; int botnumber =0; int timeround=0; int camerapos =600; int camcount=0; int camcount2=0; int imagesize = 625; int beenherebefore=0; PImage pic; loadfile logfile = new loadfile(); numbers createnumbers = new numbers(); drawcircles drawstuff = new drawcircles(); grid board = new grid(); void setup (){ size (imagesize,imagesize); background(255,255,255); smooth(); pic = loadImage("jake2.jpg"); noStroke(); } void draw(){ if (stopper == 1){ //do this stuff once only timeround++; pic.loadPixels(); logfile.load(timeround); //load the logfile logfile.cutme(); // cut the crap off it, and find number of players logfilecut = expand(logfilecut, logfile.cutlog.length); arraycopy(logfile.cutlog, logfilecut); //copy the cut array into here so we can pass it to the next class contract(logfile.cutlog, 1); //delete cutlog //println(logfilecut[0]); createnumbers.intthem(logfilecut); // turn the string array into an array of floats only contract(logfilecut, 1); //delete logfilecut floatsonly = expand(floatsonly, createnumbers.numbersarray.length); arraycopy(createnumbers.numbersarray, floatsonly); //copy the floats only array into here so we can pass it to the drawing class contract(createnumbers.numbersarray, 1); //delete logfilecut drawstuff.acceptarray(floatsonly); //let the drawing class accept the array stopper = 0; board.drawgrid(); background(255,255,255); } drawstuff.nextthree(numberofloops); //the drawing class now draws over and over again numberofloops=numberofloops+3; //add three cuz we are jumping by threes through the array trackmyprogress=trackmyprogress+3; //this keeps us up to date while the postscript file is being written if (numberofloops == floatsonly.length){ //if there is no more file left, stop saveFrame("pic-####.tif"); background(255,255,255); stopper =1; numberofloops=0; //reset counter k=0; if (timeround==4){ timeround=0; } contract(floatsonly, 1); //delete floatsonly } if (trackmyprogress>=(floatsonly.length/10)){ //this is here to act like a loading bar. and reset everything after a go. k++; print("Im "); print (k*10); println ("% done"); trackmyprogress=0; } }//end draw loop