PImage img; color[] imageColors; MyCircle c; int i; void setup() { size(500,500); //read color palette from a color image. check the image out to see how it is being read! img = loadImage("colpalette-A.jpg"); imageColors = new color[10]; for(int x = 0; x < 10; x+=1){ imageColors[x] = img.get(x*10+1,5); } PVector center = new PVector(250,250,0); c = new MyCircle(center, 15.5); } void draw() { //the expression "abs(pmouseX-mouseX) + abs(pmouseY-mouseY)" is correlated with the speed of the mouse. pmouse-> prev mouse point float deltaMouse = abs(pmouseX-mouseX) + abs(pmouseY-mouseY); c.Move(mouseX, mouseY); //frameCount%10 is a number between 0 and 10. '%' is the modulo (or remainder) operator. check reference. c.ChangeColor(imageColors[frameCount%10]); //use the speed of the mouse to affect the size and opacity of the circle. c.Grow(deltaMouse); c.Draw(deltaMouse); }