BackG backG; Circle[] circle = new Circle[20]; class BackG { int i = 0; BackG() { for (int n = 0;n<20;n++) circle[n] = new Circle(); } void display() { noStroke(); fill(#81f7f3); rect(width/2, height/2, width, height); if (i >= 19) i = 0; for (int n = 0;n<20;n++) circle[n].display(); } void mouseReleased() { circle[i].isMove = true; circle[i].x = mouseX; circle[i].y = mouseY; circle[i].dx = 0; circle[i].dy = 0; i++; } } class Circle { float x = width/2, y = height/2; float dx = 0, dy = 0; boolean isMove = false; float clear = 255; void display() { if (isMove) { noFill(); stroke(#E0F8F1,clear); strokeWeight(10); ellipse(x, y, dx, dy); dx+= width*0.005; dy+= width*0.005; clear -=0.8; if (dy >height*2.5 || clear < 0){ isMove = false; clear = 255; } } } }