Circle[] circ; Square[] squ; float recx[], recy[], scal[]; int num = 1; int arrnum=2000; int num2= 30; int randcount=0; boolean recorded = false; void setup(){ size(400,400); background(220); noStroke(); ellipseMode(CENTER_DIAMETER); rectMode(CENTER_DIAMETER); smooth(); recx = new float[arrnum]; recy = new float[arrnum]; scal = new float[arrnum]; circ = new Circle[num]; squ = new Square[num2]; for(int i=0;i=squ[i].start) squ[i].playit(); } if(circ[0].dragged) circ[0].drag(); if(circ[0].dragged==false){ if(circ[0].x!=circ[0].origx || circ[0].y!=circ[0].origy)circ[0].goback(); } circ[0].paint(); } void mousePressed(){ circ[0].checkdrag(); recorded=false; for(int i=0;ix-w/2 && mouseXy-w/2 && mouseY=1){ x=origx; y=origy; xD=yD=stopx=stopy=0; recorded = true; } float dist = sqrt((origx-x)*(origx-x)+(origy-y)*(origy-y)); w = 20+dist/5; rec(); } void rec(){ recx[reccount]= origx-x; recy[reccount]= origy-y; scal[reccount] = w-20; reccount++; } } class Square{ float x, y,origx, origy, w, col; int playcount, start; // CONSTRUCTOR Square(float _x, float _y, float _w,float _col, int nr){ x = origx= _x; y = origy= _y; w = _w; col = _col; start = nr; } void paint(){ fill(col, col,col,col); ellipse(x,y,w,w); //rect(x,y,w,w); } void playit(){ if(playcount