mouseFlow();


int num = 100;

float[] xpos = new float[num];
float[] ypos = new float[num];
float[] xpos2 = new float[num];
float[] ypos2 = new float[num];

void setup() {
size(530, 530);
colorMode(HSB, 360, 100, 100);
smooth(8);

for (int i = 0; i < xpos.length; i++) { xpos[i] = 0; //initialization - doesnt seem to matter what this is. ypos[i] = 0; xpos2[i] = 0; ypos2[i] = 0; } } void draw() { background(360); for (int i = 0; i < xpos.length-1; i++) { xpos[i] = xpos[i+1]; ypos[i] = ypos[i+1]; xpos2[i] = xpos2[i+1]; ypos2[i] = ypos2[i+1]; } // give me the value of the array, //and iterate up to 49, //adding one each time. xpos[ypos.length-1] = mouseX+5; ypos[ypos.length-1] = mouseY; xpos2[ypos.length-1] = map(mouseX, 0, width, width, 0); ypos2[ypos.length-1] = mouseY; //puts the current mouse position in the last spot of the array // .length-1 = the last spot in the array for (int i = 0; i < xpos.length; i++) { noStroke(); fill(xpos[i]/2, 75, 100); ellipse(xpos[i], ypos[i], i, i); // sets position of ellipse fill(xpos[i]/2, 75, 100); ellipse(xpos2[i], ypos2[i], i, i); // sets position of ellipse //plus diameter as array, and color fade } } [/java]