//ISABOLIVIA // Number of spots int numSpots = 40; // Declare and create an array of spots Spot[] spots = new Spot[numSpots]; void setup(){ background(231, 240, 121); size(560,700); smooth(); noStroke(); for (int i = 0; i < spots.length; i++) { float x = 1 + i*2; float rate = 1.5 + i*0.3; color c = color(245, 203, 239); spots[i] = new Spot(x, 10, 10+random(20), rate, c); } } void draw(){ background(231, 240, 121); for(int i =0; i < spots.length; i++){ spots[i].move(); spots[i].changeColor(); spots[i].diameter = 3+random(20); spots[i].display(); } } class Spot { float x; // X-coordinate float y; // Y-coordinate float diameter; // Diameter of circle float speed; // Distance moved each frame int direction = 1; // Direction (1 is down; -1 is up) color col; Spot(float xpos, float ypos, float dia, float s, color c){ x = xpos; y = ypos; diameter = dia; speed = s; col = c; } void display() { fill(col); ellipse(x, y, 30, 30); } void move(){ y += (speed * direction); if((y > (height - diameter/12)) || (y < diameter/22)){ direction *= -1; } } // The disappear() method does not do anything until you add code inside of the curl braces {}. //void disappear(){} void changeColor(){ stroke(250, 129, 175); col = color(250, 129, 175); //eyes stroke(255); strokeWeight(3); fill(255); ellipse(300, 200, 70, 45); stroke(93, 157, 224); ellipse (140, 180, 80, 65); fill(0); ellipse(315, 195, 20, 20); ellipse(140, 170, 20, 20); //straighteyebrow stroke(93, 157, 224); strokeWeight(9); line(90, 140, 200, 140); //nose strokeWeight(9); line(290, 280, 200, 145); noFill(); strokeWeight(3); ellipse(230, 300, 50, 50); ellipse(220, 300, 30, 30); ellipse(280, 300, 20, 20); triangle(240, 360, 250, 320, 260, 360); //mouth strokeWeight(10); stroke(237, 86, 96); line(130, 390, 245, 390); arc(190, 390, 50, 50, PI/2, PI); arc(200, 390, 70, 40, PI, TWO_PI-PI/2); arc(200, 390, 50, 50, 0, PI/2); //curvedeyebrow strokeWeight(6); stroke(63, 88, 149); arc(300, 180, 80, 45, TWO_PI, PI); stroke(0); //fringe stroke(246, 255, 8); fill(246, 255, 8); arc(240, 120, 300, 140, PI, TWO_PI); noFill(); //hair fill(246, 255, 8); triangle(331, 400, 373, 150, 450, 480); //counter stroke(145, 98, 16); strokeWeight(10); line(0, 450, 400, 500); line(400, 500, 330, 800); stroke(240, 157, 196); //flowers if(mousePressed){ stroke(240, 191, 215); noFill(); ellipse(450, 120, 30, 30); ellipse(450, 100, 30, 30); ellipse(370, 150, 20, 20); ellipse(550, 230, 30, 30); ellipse(390, 120, 30, 30); ellipse(395, 50, 20, 20); ellipse(550, 80, 30, 30); ellipse(390, 90, 30, 30); ellipse(400, 100, 30, 30); ellipse(450, 250, 30, 30); ellipse(550, 230, 20, 20); ellipse(410, 300, 20, 20); ellipse(380, 310, 20, 20); ellipse(370, 295, 30, 30); strokeWeight(5); stroke(250, 179, 215); ellipse(500, 340, 50, 55); ellipse(470, 159, 60, 50); ellipse(500, 250, 55, 50); //eyes IZZ stroke(82, 144, 85); strokeWeight(3); fill(255); ellipse(300, 200, 70, 45); stroke(82, 144, 85); ellipse (140, 180, 80, 65); fill(0); ellipse(315, 210, 20, 20); ellipse(140, 180, 20, 20); //fringe IZZ stroke(72, 50, 36); fill(72, 50, 36); arc(240, 120, 300, 160, PI, TWO_PI); noFill(); //hair IZZ fill(72, 50, 36); triangle(331, 400, 373, 150, 450, 480); triangle(10, 290, 70, 150, 70, 280); //nose IZZ stroke(82, 144, 85); strokeWeight(9); line(290, 280, 200, 145); noFill(); strokeWeight(3); ellipse(230, 300, 50, 50); ellipse(220, 300, 30, 30); ellipse(280, 300, 20, 20); triangle(240, 360, 250, 320, 260, 360); //straighteyebrow IZZ stroke(82, 144, 85); strokeWeight(10); line(90, 140, 200, 140); //glasses IZZ stroke(57, 42, 33); strokeWeight(9); noFill(); ellipse(290, 200, 95, 95); ellipse(145, 180, 95, 95); line(200, 180, 200, 200); line(200, 180, 245, 210); stroke(245, 178, 204); } else{ stroke(240, 179, 212); noFill(); ellipse(350, 100, 50, 50); strokeWeight(5); ellipse(400, 60, 50, 50); ellipse(495, 70, 40, 40); ellipse(400, 100, 50, 50); ellipse(450, 50, 50, 50); ellipse(500, 30, 50, 50); ellipse(550, 320, 40, 40); ellipse(550, 220, 30, 30); ellipse(550, 250, 30, 30); ellipse(390, 150, 50, 50); ellipse(550, 160, 50, 50); ellipse(600, 200, 50, 50); noFill(); fill(247, 160, 202); strokeWeight(4); stroke(250, 179, 215); ellipse(500, 340, 50, 55); ellipse(470, 159, 60, 50); ellipse(500, 250, 55, 50); ellipse(450, 270, 50, 50); ellipse(420, 220, 60, 50); ellipse(400, 120, 50, 50); ellipse(390, 130, 50, 50); ellipse(400, 140, 50, 50); ellipse(450, 150, 50, 50); ellipse(400, 50, 50, 50); ellipse(480, 230, 50, 55); } } }