int x=0; int y=100; int i=0; int r = 1; float r1 =0; float r2 = 0; void setup() { size(400,400); background(200,0,0); ellipseMode(CENTER_DIAMETER); rectMode(CENTER_DIAMETER); } void loop() { background(200,0,0); noStroke(); /* elli(i,i,50,50); //(i*2)%400 mod stroke(255,255,255); lin1(10,20,100,120+i); i=i+(5*r); if (i == 400) r = -1; if (i== -5) r = 1; */ r1 = (random(4))-mouseX; r2 = (random(4))-mouseY; cir2(r,r2,30,30); cir1(i,mouseY,30,30); stroke(255,255,255); cir(mouseX,mouseY,30,30); i=i+(5*r); if (i == 100) r = -1; if (i== -5) r = 1; } void cir(float x, float y, float rad, float rad2){ ellipse(x,y,rad,rad2); ellipse(mouseX -random (x/2),mouseY - random (y/4),rad,rad2); } void cir1(float x, float y, float rad, float rad2){ ellipse(x,y,rad,rad2); } void cir2(float x, float y, float rad, float rad2){ ellipse(x,y,rad,rad2); }