//Class of individual parts of Fermat's sprial class Floret { float x, y; // values for x and y locations of the floret float w; // floret's width color c; // color of the floret Floret(float nX, float nY, float nW) { x = nX; y = nY; w = nW; reset(); } void drawFloret() { noStroke(); fill(c); ellipse(x,y,w,w); } // return true if location sent is location of this floret boolean isThere(float gX, float gY) { if(gX <= x+w/2 && gX >= x-w/2 && gY <= y+w/2 && gY >= y-w/2) return true; else return false; } // change color of floret to dark blue void setClicked() { c = color( 87,143,178 ); } // change color of floret to light blue void setNear() { c = color( 132,177,205 ); } // return color of floret to original white void reset() { c = color( 255 ); } }