/* Twinkling "Stars" HW Liz Rutledge August 10,2010 */ int z=500; //***ENTER DESIRED NUMBER OF STARS HERE!!!*** //***Boolean options/preferences (change from true to false and vice versa to change options)***// Boolean dance=false; //Do you want the stars to boogie with their bad selves? Boolean messWithColors=false; //Want the stars' colors to change so fast it MIGHT give you a seizure? Boolean circles=true; //want the stars to be circles instead of oblong? //**create arrays of length z (number of stars)**// float[] w = new float[z]; float[] ex = new float[z]; float[] ey = new float[z]; float[] ew = new float[z]; float[] eh = new float[z]; float[] ewcontrol = new float[z]; float[] g = new float[z]; float[] exd = new float[z];//declare arrays to change the stars' position float[] exy = new float[z]; float rd=10;//color variables float gr=10; float b=50; float grandom=200; float brandom=200; float r; void setup(){ size(600,400); background(rd,gr,b); smooth(); frameRate(30); for(int i=0;i=(ewcontrol[i]*r)){ g[i]=-1; } if(mousePressed && g[i]>0){ g[i]=0; } else if(mousePressed && g[i]==0){ g[i]=1; } } //ends for loop }//ends draw function