float i = 0; float j = 640; float k = 0; float l = 640; float vima1,vima2,vima3,vima4 ; void setup(){ size(640,320); frameRate(30); } void draw(){ background(0); textSize(32); text(i,10,30); text(millis(),100,30); text(i*1000/millis(), 300, 30 ); text(frameCount, 10, 100); ellipse(i, 200,10,10); ellipse(j, 220,10,10); ellipse(k, 250,10,10); ellipse(l, 290,10,10); if(i==0){ vima1 = 1; } if(i==640){ vima1= -1; } if(j==0){ vima2 = 1; } if(j==640){ vima2= -1; } if(k==0){ vima3 = 1; } if(k==640){ vima3= -1; } if(l==0){ vima4 = 1; } if(l==640){ vima4= -1; } i = i + vima1; j = j + vima2/0.5; k = k + 2*vima3; l = l + 10*vima4; }