// // // Pcircle[] r ; int dn = int(random(10,50)); //decide pnumbers received and sent int keypad = 200; //keypad size int keycheck = 1; void setup() { //size(147.196); size(147,196+keypad); background(255); smooth(); float v; // default speed int total = 250; // sum of calls // int stotal = 3600; //sum of sec r = new Pcircle[dn]; // declare r of class Pcircle for(int i = 0; i (width-(sec/90)/2) || xpos<(sec/90)/2){ xdirection *= -1; } if(ypos >((height-keypad)-(sec/90)/2) || ypos<(sec/90)/2){ ydirection *= -1; } } void lineUp(){ float a = (width/2)+60*cos(TWO_PI/dn*num); float b = ((height-keypad)/2)+60*sin(TWO_PI/dn*num); float ax = a - cxpos; float ay = b - cypos; if((abs(a-xpos)<=abs(ax/80)) && (abs(b-ypos)<=abs(ay/80))){ xpos = a; ypos = b; } else{ xpos = xpos+ax/80; ypos = ypos+ay/80; } } } void keyPressed(){ if(keyCode == ENTER){ keycheck = -1; } }