ArrayList balloonsLeft = new ArrayList(); ArrayList balloonsRight = new ArrayList(); void setup() { size(1280,720); background(255); initBalloonsLeft(5); initBalloonsRight(5); } void draw() { //background(255); for (int i=0; iwidth) { x=0; } } } class balloonRight { //Attributes float x; float y; float size; float speed; color c; //Constructor balloonRight(float tempX, float tempY) { x = tempX; y = tempY; size = random(8,20); speed = 3; c = color(0,random(255),random(255),15); } //Functions void update() { drawSelf(); windRandom(7); checkBorder (); } void drawSelf() { fill(c); stroke(0,50); rectMode (CENTER); rect(x,y,size,size); } void windRandom ( float strength) { x-= 2*noise(-strength,strength); y-= 2*random(-strength,strength); } void checkBorder () { if (x<0) { x=width; size+=10; } }}