//it's my first art piece program I've ever written //move the mouse around the window to control the colored circles //click and hold on the mouse to stop the trails fading out //I don't know why the web applet doesn't look as good as the applications //it doesn't seem to handle the transparency or the HSB colormode command // //enjoy //jeff hedberg //http://www.evilblender.com float currX; float currY; float prevX; float prevY; float i = 0; void setup(){ size(200,200); smooth(); colorMode(HSB,100,100,100,100); fill (0,0,0,100); rect(0,0,width,height); } void draw(){ noStroke(); currX = (mouseX - prevX) / 50; currY = (mouseY - prevY) / 50; prevX = prevX + currX; prevY = prevY + currY; fill(i,75,80,100); //the four corners ellipse(prevX,prevY,10,10); ellipse(width-prevX,prevY,10,10); ellipse(prevX,height-prevY,10,10); ellipse(width-prevX,height-prevY,10,10); //now the reverse y and x ellipse(prevY,prevX,10,10); ellipse(height-prevY,prevX,10,10); ellipse(prevY,width-prevX,10,10); ellipse(height-prevY,width-prevX,10,10); // cycle the colors i+=.5; if (i==100) i=0; //mouse down = start to erase (slowly) if (mousePressed == true) { }else{ fill(0,2); rect(0,0,width,height); } }