int NUM_BLOBS=100; boolean keyp=false; class Blob { float x,y,vx,vy; color c; int r; BGraphics target; // Blob(int _x, int _y, BGraphics _target) Blob(int _x, int _y, int _r, BGraphics target) { x=_x; y=_y; r=_r; vx=random(-2,2); vy=random(-2,2); // target=_target; c=color(int(random(255)),int(random(255)),int(random(255)),32); } void Draw() { float closest=width*height; int k; boolean found=false; for(int i=int(y-r);i=0&&i=0&&jwidth) { vx=-vx; } if(y+vy<=0 || y+vy>height) { vy=-vy; } x+=vx; y+=vy; } } class Curvepoint { float x,y,vx,vy; Curvepoint(float _x, float _y) { x=_x; y=_y; vx=random(-5,5); vy=random(-5,5); } void Move() { if(x+vy>=width || x+vy<0) { vx=0-vx; vx+=random(-0.5,0.5); } if(y+vy>=height || y+vy<0) { vy=0-vy; vy+=random(-0.5,0.5); } x+=vx; y+=vy; } } Blob[] blobs; Curvepoint[] points; BGraphics overlay; void setup() { size(400,400); overlay=new BGraphics(width,height); overlay.stroke(0); overlay.background(0); noStroke(); background(255,255,255); blobs=new Blob[NUM_BLOBS]; points=new Curvepoint[8]; int a=int(sqrt(blobs.length)); for(int i=0;i25) { NUM_BLOBS/=2; keyp=true; } }