//Declaring objects Ball ball; Ball ball2; Ball ball3; Ball ball4; Orbs orbs; Orbs orbs2; Orbs orbs3; Orbs orbs4; void setup() { size(600, 600); background(255); //initializing new objects with random variables ball = new Ball(random(0, width), random(0, height), random(5, 50), random(5, 50), random(0.5, 2), color(random(255),random(255),random(255))); ball2 = new Ball(random(0, width), random(0, height), random(5, 50), random(5, 50), random(0.5, 2), color(random(255),random(255),random(255))); ball3 = new Ball(random(0, width), random(0, height), random(5, 50), random(5, 50), random(1, 3), color(random(255),random(255),random(255))); ball4 = new Ball(random(0, width), random(0, height), random(5, 50), random(5, 50), random(1, 3), color(random(255),random(255),random(255))); orbs = new Orbs(random(0, width), random(0, height), random(5, 50), random(5, 50), random(0.75, 1), color(random(255),random(255),random(255))); orbs2 = new Orbs(random(0, width), random(0, height), random(5, 50), random(5, 50), random(0.75, 1.5), color(random(255),random(255),random(255))); orbs3 = new Orbs(random(0, width), random(0, height), random(5, 50), random(5, 50), random(0.75, 1.5), color(random(255),random(255),random(255))); orbs4 = new Orbs(random(0, width), random(0, height), random(5, 50), random(5, 50), random(0.75, 1.5), color(random(255),random(255),random(255))); } void draw() { fill(255,60); rectMode(CENTER); rect(width/2,height/2,350,350); //redraws a rectangle in the middle of the screen ball.display(); //adding functunality to object: balls which follow the mouse in x/y direction ball2.display(); ball3.display(); ball4.display(); orbs.display(); //adding functionality to object: orbs which follow and rotate around the mouse orbs2.display(); orbs3.display(); orbs4.display(); }