float x,y,theta; int t; void setup(){ background(0); size(800,600); x=width/2; y=height/2; t=1; rectMode(CENTER); noFill(); ellipseMode(CENTER); } void draw(){ //noStroke(); //rect(x,y,5,5); theta=random(TWO_PI); stroke(0,255,0); line(x,y,x+(10*sin(theta)),y+(10*cos(theta))); x+=10*sin(theta); y+=10*cos(theta); //ellipse(width/2,height/2,(10*sqrt(t))/2,(10*sqrt(t))/2); t++; if (x<0){ x=0; } else if (x>width){ x=width; } if (y<0){ y=0; } else if (y>height){ y=height; } println(frameRate); } void mousePressed(){ background(0); }