class Word { public String txt; public int count = 1; public int prevcount = 1; public float x,y; public float xr,yr; public float s = 0; public float a = 255; public float c = 0; public float p,t; Word(String txt) { this.txt = txt; this.x = random(width); this.y = random(height); this.xr = random(4)-2; this.yr = random(4)-2; this.p = random(TWO_PI)-PI; this.t = random(TWO_PI)-PI; } void move() { p+=random(TWO_PI); t+=random(TWO_PI); x+=xr*sin(t)*sqrt(count); if (x<0 || x>width) xr=-xr; y+=yr*cos(p)*sqrt(count); if (y<0 || y>height) yr=-yr; } int getX() { return int(x); } int getY() { return int(y); } }