/** * Move mouse to trail small cubes. Click to change background color and reset. */ Ball myBall; Cube [] myCube = new Cube[10]; float r; float g; float b; float a; void setup() { size(400,400); background(0); smooth(); myBall = new Ball(random(0, width), random(0, height)); for (int i = 0; i < myCube.length; i++) myCube[i] = new Cube(color(i*2),0,i*2,i/20.0); } void draw() { r = random(255); g = random(255); b = random(255); a = random(255); myBall.move(); myBall.bounce(); myBall.display(); for (int i = 1; i