// Bunte Bälle bewegen sich // Reflexion an den Wänden int ANZAHL = 250; Ball[] balls; void setup() { size(200,200); balls = new Ball[ANZAHL]; for (int i=0; i=0 && xnew=0 && ynew=width) { x = 2*(width)-x; y = ynew; vx = -vx; } if (ynew=height) { x = xnew; y = 2*(height)-y; vy = -vy; } } } // ////////////////////////////////////////////////////////////