//declaring variables *PLZ dont deduct too many marks PLZ sir* int numCircles = 110; int dia = 10; float[] x = new float[numCircles]; float[] y = new float[numCircles]; //Setup size of the window and set ints void setup() { size(400, 400); noFill(); for (int i = 0; i < numCircles; i++) { x[i] = (int)random(width); y[i] = (int)random(height)-height-dia/2; } } // draw in background,mid-ground and fore-ground void draw() { //BUILDINGS fill(90,87,87); stroke(0); strokeWeight(1); rect(0,0,width/3,height/2);// Buidling 1 rect(width/3,0,width/3,height/2);// Building 2 rect(width/1.5,0,width/3,height/2);// Building 3 //ROAD noStroke(); fill(86,93,99); rect(0,200,width,200); //SIDEWALK SHADOW noStroke(); fill(14,9,34,15);//sidewalk_shadow rect(0,310, width,30); rect(0,310, width,25); rect(0,310, width,20); rect(0,310, width,15); rect(0,310, width,10); //SIDEWALK fill(156,172,177); //Sidewalk_color rect(0,height/2,width,100);//sidewalk fill(107,117,122); //underside_sidewalk_color rect(0,300, width,15);//underside_sidewalk //LEDGE noStroke(); rect(0,0,width,13);// ledge awning fill(14,9,34,15);//awning shadow fill rect(0,13,width,21);// awning shadow rect(0,13,width,18);// awning shadow rect(0,13,width,15);// awning shadow rect(0,13,width,13);// awning shadow rect(0,13,width,9);// awning shadow rect(0,13,width,7);// awning shadow //BULDING SHADOW fill(14,9,34,22);//building shadow fill rect(0,height/2,width,65);//building shadow rect(0,height/2,width,50);//building shadow rect(0,height/2,width,40);//building shadow rect(0,height/2,width,30);//building shadow rect(0,height/2,width,25);//building shadow rect(0,height/2,width,15);//building shadow rect(0,height/2,width,10);//building shadow rect(0,height/2,width,5);//building shadow // LEFT WINDOW noStroke(); fill(48,91,110); ellipseMode(CENTER); rect(20,60,93,125); //window_left ellipse(66.5,65,93,93); fill(175,184,218); rect(20,165,92,20); //window_base fill(209,241,235); //window_base_top_color rect(20,160,92,5); //window_base_top fill(14,9,34,22);//window_shadow_color rect(44,185,92,14); //window_shadow rect(38,185,92,10); //window_shadow rect(32,185,92,6); //window_shadow rect(26,185,92,2); //window_shadow //WINDOW STRKS stroke(149,166,165,55);//window_streak strokeWeight(5); line(85,50,40,120); line(85,80,40,150); //COLUMN noStroke(); fill(173,174,174);//color_column_left rect(113.3,13,20,188);//column_left fill(203,213,209);///Column_top_left_color rect(113.3,13,20,20);//columnTop_left fill(14,9,34,20);//shadow_color rect(97,13,15,146);//column_left_shadow rect(102,13,10,146);//column_left_shadow rect(107,13,5,146);//column_left_shadow //DOOR noStroke();//door_center fill(117,117,116);// find color picker value for door arc rect (143.3,50,113,145); fill(48,91,110); rect(153.3,60,93,125); //DOOR STRKS stroke(149,166,165,55); strokeWeight(5); line(225,80,160,135); line(225,110,180,155); stroke(170,118,38); line(235,130,235,137); //STEPS noStroke(); fill(173,174,174);// find color picker value for steps rect(153.3,181,93,10.5); fill(51,50,50);// find color picker value for steps rect(133.3,192,132,7.5); //RIGHT WINDOW noStroke(); fill(48,91,110); rect(286.6,60,93,125); //window_right ellipse(333.1,65,93,93); fill(175,184,218); rect(286.6,165,93,20); //window_base fill(209,241,235); //window_base_top_color rect(286.6,160,93,5); //window_base_top fill(14,9,34,32);//window_shadow_color rect(286.6,185,76,14); //window_shadow rect(286.6,185,81,10); //window_shadow rect(286.6,185,87,6); //window_shadow rect(286.6,185,93,2); //window_shadow //WINDOW STRKS RIGHT stroke(149,166,165,55); strokeWeight(5); line(360,53,300,120); line(360,83,300,150); //COLUMN noStroke(); fill(173,174,174);//color_column_right rect(265.3,13,20,188);//column_right fill(14,9,34,20);//shadow_color rect(249,13,15,188);//column_right_shaodw rect(255,13,10,188);//column_right_shaodw rect(260,13,5,188);//column_right_shaodw fill(203,213,209);///color_columnTop_right rect(265.3,13,20,20);//columnTop_right //RAT noStroke(); fill(0,0,0,120); ellipse(mouseX,height/2+16,22,3); fill(225); ellipse(mouseX,height/2,30,30); ellipse(mouseX+17,height/2,15,15); fill(100); ellipse(mouseX+17,height/2-10,15,15); fill(0); ellipse(mouseX+17,height/2-3,4,4); fill(230,158,181); ellipse(mouseX+25,height/2,5,5); rect(mouseX-25,height/2,10,2); //BOXES fill(0,0,0,150); ellipse(20,228,75,15); ellipse(380,228,75,15); fill(109,88,82); rect(0,180,50,50); rect(350,180,50,50); fill(157,122,82); triangle(0,180,25,175,50,180); triangle(350,180,375,175,400,180); //CHARACTER //Head noStroke(); fill(251,201,188);//head_color ellipse(153.3,123,85,85);//head //EYES fill(0); noStroke(); ellipse(133,120,15,15);//eye_left ellipse(173,120,15,15);//eye_right //fill(225); //noStroke(); //ellipse(131,118,2,2); //ellipse(171,118,2,2); //TORSO fill(63,91,92);//torso_color rect(119,165,65,125);//torso //BEARD noStroke(); fill(229,220,197);//Beard_color triangle(117,145, 148, 200, 190, 145);//Beard //PANTS fill(42,41,95);//lower_color rect(119,290,65,35);//lower //LEGS fill(42,41,95);//legs_color rect(119,325,15,75);//legs_left rect(169,325,15,75);//legs_right //ARMS noStroke(); fill(251,201,188);//arms_color quad(70,280,119,165,119,205,75,300);//arms_left quad(233,282.9,184,165,184,205,228,300);//arms_right //SLEEVES fill(138,89,124); quad(90,230,119,165,119,205,100,250);//arms_sleeve_left quad(210,225,184,165,184,205,201,245);//arms_sleeve_right //MUSTACHE fill(255,245,220);//mustache_color triangle(155,135,127,140,109,180);//left_piece triangle(155,135,182,140,200,180);//right_piece //BEANIE fill(38,75,127); arc(153,105,77, 60, -PI, 0); stroke(38,14,67,20); strokeWeight(1); rect(113,100,80,9); ellipse(151,69,20,20); //BEANIE_BALL stroke(29,13,56,90);//Beanie_Shadow strokeWeight(2); arc(143,76,34,15,0,1.5);//beanie_arc noStroke();//Beanie_rim fill(29,13,56,75); rect(115,98,75,3); //PANTS DETAILS stroke(16,17,53); line(120,295,182,295);//pants_details line(145,295,145,323); line(156,295,156,323); //SWEATER DETAILS stroke(207,132,148,115); line (120,260,182,260); line (120,240,182,240); line (120,220,182,220); line (120,200,182,200); //SNOW FALL for (int i = 0; i < numCircles; i++) { if (y[i] > height+dia/2) { x[i] = (int)random(width); y[i] = (int)random(height)-height-dia/2; } y[i]++; fill(225,225,225,0); if (mousePressed) fill(255,255,255,185); noStroke(); ellipse(x[i], y[i], dia, dia); } }