Rotator[] rotators; int count = 4; void setup() { println("George Pollard – Assignment 2 – Animate Processing"); println(" programmed whilst listening to: Gabriel Rene - Absynthesis :)"); size(350,400); smooth(); rotators = new Rotator[count]; for (int i = 0; i < rotators.length; i++) rotators[i] = new Rotator(8.0/((i+1)*(0.35))); } void draw() { background(204); for (int i = 0; i < rotators.length; i++) rotators[i].update(); } class Rotator { float fullTime; int currentFrame; public Rotator(float seconds) { fullTime = seconds; } void update() { if (++currentFrame >= (frameRate*fullTime)) currentFrame = 0; float amount = currentFrame / (frameRate * fullTime); float x = amount * width; float y = amount * height; quad(x, 0, width, y, width - x, height, 0, height - y); } }