// Jiveen Liew // Student #: 991469860 void setup () { size (400, 400); } void draw() { frameRate(60); //sky// background (135, 206, 250); //sun// noStroke(); fill(244, 245, 25); ellipseMode(CENTER); ellipse(202, 260, 210, 210); //sun rays// fill(255, 255, 255, 50-(mouseY-200)*(mouseY-200)/500); ellipse(202, 260, 300, 300); fill(255, 255, 255, 50-(mouseY-200)*(mouseY-200)/450); ellipse(202, 260, 375, 375); fill(255, 255, 255, 50-(mouseY-200)*(mouseY-200)/300); ellipse(202, 260, 425, 425); fill(255, 255, 255, 50-(mouseY-200)*(mouseY-200)/250); ellipse(202, 260, 500, 500); fill(255, 255, 255, 50-(mouseY-200)*(mouseY-200)/100); ellipse(202, 260, 625, 625); //buildings// stroke(20); fill(20); rectMode(CENTER); rect(7, 250, 10, 90); rect(20, 230, 12, 100); triangle(20, 180, 21, 152, 22, 180); rect(40, 250, 9, 120); rect(60, 250, 13, 200); rect(159, 270, 10, 130); rect(180, 270, 13, 160); rect(180, 270, 13, 160); rect(200, 270, 10, 200); rect(225, 250, 10, 40); rect(235, 260, 15, 30); rect(270, 270, 13, 160); rect(283, 270, 12, 230); rect(295, 270, 14, 180); rect(310, 270, 20, 130); rect(355, 288, 20, 180); rect(380, 280, 15, 140); rect(395, 280, 20, 110); strokeWeight(3); line(284, 130, 284, 174); line(280, 140, 280, 174); triangle(347, 188, 363, 188, 355, 172); rect(355, 194, 16, 10); //hills// noStroke(); fill (169, 252, 169); rectMode(CORNERS); rect(0, 270, 400, 400); ellipseMode(CENTER); ellipse(65, 287, 300, 100); fill (122, 250, 122); ellipseMode (CORNERS); ellipse(-40, 255, 600, 600); fill(61, 248, 61); ellipseMode(CENTER); ellipse(45, 500, 1000, 400); //clouds// fill(245); strokeWeight(2); stroke(245); rectMode(CORNER); rect(241+cos(frameCount/400.0)*500, 90, 30, 5); ellipseMode(CENTER); ellipse(240+cos(frameCount/400.0)*500, 90, 11, 11); ellipse(250+cos(frameCount/400.0)*500, 88, 15, 15); ellipse(259+cos(frameCount/400.0)*500, 89, 10, 10); ellipse(261+cos(frameCount/400.0)*500, 87, 16, 16); ellipse(250+cos(frameCount/400.0)*500, 89, 9, 9); ellipse(274+cos(frameCount/400.0)*500, 91, 9, 8); fill(235); stroke(235); rect(167+cos(frameCount/400.0)*400, 54, 30, 5); ellipse(167+cos(frameCount/400.0)*400, 54, 11, 11); ellipse(175+cos(frameCount/400.0)*400, 52, 15, 15); ellipse(184+cos(frameCount/400.0)*400, 50, 17, 17); ellipse(196+cos(frameCount/400.0)*400, 55, 9, 9); fill(215); stroke(215); rect (166+cos(frameCount/260.0)*260, 70, 43, 6); ellipse(168+cos(frameCount/260.0)*260, 71, 10, 10); ellipse(184+cos(frameCount/260.0)*260, 68, 23, 16); ellipse(202+cos(frameCount/260.0)*260, 70, 13, 13); ellipse(212+cos(frameCount/260.0)*260, 72, 9, 9); fill(205); stroke(205); rect(330+cos(frameCount/550.0)*600, 24, 35, 6); ellipse(332+cos(frameCount/550.0)*600, 24, 12, 12); ellipse(340+cos(frameCount/550.0)*600, 21, 18, 18); ellipse(350+cos(frameCount/550.0)*600, 18, 25, 25); ellipse(352+cos(frameCount/550.0)*600, 20, 21, 21); ellipse(366+cos(frameCount/550.0)*600, 24, 14, 12); fill(198); stroke(198); rect(491+cos(frameCount/500.0)*600, 165, 59, 5); ellipse(489+cos(frameCount/500.0)*600, 165, 10, 10); ellipse(500+cos(frameCount/500.0)*600, 161, 18, 18); ellipse(514+cos(frameCount/500.0)*600, 159, 20, 23); ellipse(529+cos(frameCount/500.0)*600, 157, 22, 18); ellipse(540+cos(frameCount/500.0)*600, 160, 13, 12); ellipse(550+cos(frameCount/500.0)*600, 166, 9, 9); //Saitama// //Torso stroke(0); fill(230); ellipseMode(CENTER); quad(35, 335, 17, 381, 14, 400, 51, 400); noStroke(); fill(242, 207, 90); quad(37, 337, 33, 410, 179, 410, 170, 338); ellipse(163, 410, 40, 40); ellipse(37, 390, 20, 80); //Shoulder noStroke(); ellipseMode(CENTER); ellipse(110, 350, 120, 50); //Neck noStroke(); fill(237, 215, 192); rectMode(CORNERS); rect(75, 284, 120, 345); //Cape noStroke(); fill(230); //Right quad(120, 319, 137, 360, 166, 359, 175, 338); ellipseMode(CENTER); ellipse(150, 350, 35, 30); ellipse(127, 322, 12, 10); triangle(127, 326, 144, 320, 146, 334); ellipse(156, 335, 32, 15); ellipse(162, 346, 19, 28); ellipse(123, 328, 5, 20); //Left quad(25, 336, 57, 361, 83, 356, 71, 326); ellipse(70, 328, 10, 10); ellipse(56, 332, 20, 10); triangle(49, 333, 36, 330, 34, 334); ellipse(37, 340, 18, 10); ellipse(67, 355, 33, 20); //Collar stroke(0); fill(230); rectMode(CORNERS); rect(93, 357, 120, 410); rect(104, 364, 110, 410); line(105, 382, 109, 382); line(105, 388, 109, 388); line(105, 394, 109, 394); line(105, 400, 109, 400); ellipseMode(CENTER); ellipse(106, 354, 80, 30); //Neck Bottom noStroke(); fill(237, 215, 192); ellipseMode(CENTER); ellipse(105, 340, 55, 20); //Neck Lines stroke(0); line(73, 280, 73, 327); line(120, 300, 120, 341); //Cape Lines stroke(0); line(72, 324, 78, 346); //Left line(71, 323, 68, 322); line(68, 322, 63, 326); line(63, 326, 53, 326); line(53, 326, 46, 330); line(46, 330, 37, 330); line(37, 330, 36, 331); line(36, 331, 26, 336); line(26, 336, 31, 343); line(31, 343, 51, 359); line(51, 359, 68, 365); line(68, 365, 80, 358); line(80, 358, 78, 342); //Right line(121, 329, 136, 347); line(136, 347, 139, 362); line(139, 362, 154, 366); line(154, 366, 167, 358); line(167, 358, 174, 339); line(174, 339, 171, 333); line(171, 333, 162, 326); line(162, 326, 147, 327); line(147, 327, 143, 321); line(143, 321, 136, 322); line(136, 322, 131, 319); line(131, 319, 126, 317); line(126, 317, 120, 316); //Cape Buttons stroke(0); fill(30); ellipseMode(CENTER); ellipse(64, 352, 18, 10); ellipse(152, 353, 18, 11); stroke(30); line(67, 347, 66, 334); line(58, 347, 52, 338); line(54, 350, 50, 347); line(33, 332, 39, 339); line(47, 332, 49, 334); line(63, 327, 64, 330); //Right line(134, 321, 142, 336); line(142, 336, 147, 350); line(147, 327, 150, 336); line(152, 346, 151, 342); line(162, 327, 163, 335); line(160, 349, 164, 342); //Zipper stroke(0); fill(230); ellipseMode(CENTER); ellipse(106, 360, 14, 20); ellipse(106, 370, 20, 12); noStroke(); rectMode(CENTER); rect(106, 364, 11, 5); stroke(0); line(100, 360, 112, 360); ellipse(106, 360, 6, 6); fill(0); ellipse(106, 369, 2, 2); //Collar Lines stroke(0); line(80, 343, 90, 347); line(90, 347, 103, 350); line(110, 350, 122, 348); line(122, 348, 133, 345); line(73, 362, 82, 366); line(82, 366, 95, 369); line(117, 369, 128, 367); line(128, 367, 141, 362); //Shoulder Lines stroke(0); line(38, 349, 34, 353); line(34, 353, 30, 363); line(30, 363, 27, 383); line(27, 383, 25, 410); //Right line(170, 352, 174, 373); line(174, 373, 175, 391); line(175, 391, 180, 410); //Arm Lines line(54, 375, 56, 391); line(56, 391, 54, 410); line(56, 390, 63, 379); line(55, 400, 64, 389); //Right line(152, 380, 150, 390); line(150, 390, 152, 410); line(150, 396, 158, 383); //Head stroke(0); fill(237, 215, 192); ellipseMode(CENTER); ellipse(100, 230, 120, 165); //Ears stroke(0); fill(237, 215, 192); ellipseMode(CENTER); ellipse(40, 238, 25, 40); noStroke(); rectMode(CORNERS); rect(37, 230, 66, 256); //Eyes stroke(0); fill(255); ellipseMode(CENTER); ellipse(90, 213, 30, 20); ellipse(138, 213, 30, 20); //Eyelids, fill(237, 215, 192); noStroke(); quad(63, 208, 155, 208, 130, 182, 61, 181); stroke(0); line(77, 208, 102, 208); line(126, 208, 150, 208); //Pupils stroke(0); fill(0); ellipseMode(CENTER); ellipse(94, 213, 2, 2); ellipse(139, 213, 2, 2); //Eyebrows strokeWeight(2); line(77, 200, 105, 200); line(126, 200, 151, 200); //Blush noStroke(); fill(255, 182, 193, 145-(mouseX-130)*(mouseX-130)/200); //-mouseY*mouseY/200 ellipseMode(CENTER); ellipse(113, 239, 90, 30); stroke(240, 128, 128, 150-(mouseX-130)*(mouseX-130)/50); line(80, 232, 76, 244); line(93, 229, 87, 247); line(106, 227, 100, 249); line(119, 226, 113, 249); line(132, 228, 125, 249); line(145, 231, 140, 247); line(155, 237, 153, 243); //Nose stroke(0); strokeWeight(2); line(117, 220, 120, 249); line(120, 249, 118, 251); //Mouth stroke(0); fill(0); ellipseMode(CENTER); ellipse(114, 269, 12, 2); //Flower// //Stem stroke(0, 100, 0); fill(0, 100, 0); rectMode(CENTER); rect(mouseX, mouseY-9, 1, 50); //Leaf noStroke(); fill(50, 220, 60); ellipseMode(CENTER); ellipse(mouseX+6, mouseY-17, 10, 10); triangle(mouseX+16, mouseY-20, mouseX+8, mouseY-21, mouseX+8, mouseY-13); //Petals stroke(186, 85, 211); fill(231, 117, 232); ellipseMode(CENTER); ellipse(mouseX, mouseY-46, 12, 32); stroke(186, 85, 211); strokeWeight(10); //Left Petals line(mouseX-((400-mouseX)*0.03), mouseY-57, mouseX, mouseY-35); line(mouseX-((400-mouseX)*0.045), mouseY-54, mouseX, mouseY-35); line(mouseX-((400-mouseX)*0.06), mouseY-51, mouseX, mouseY-35); //Right Petals line(mouseX+((400-mouseX)*0.03), mouseY-57, mouseX, mouseY-35); line(mouseX+((400-mouseX)*0.045), mouseY-54, mouseX, mouseY-35); line(mouseX+((400-mouseX)*0.06), mouseY-51, mouseX, mouseY-35); } void mousePressed () { frameRate(2); // OK Text Bubble// //Bubble stroke(0); strokeWeight(2); fill(255); ellipseMode(CENTER); ellipse(255, 170, 92, 155); noStroke(); triangle(217, 208, 208, 216, 222, 218); stroke(0); line(215, 207, 208, 218); line(208, 218, 219, 218); //"OK" stroke(0); strokeWeight(2); ellipseMode(CENTER); ellipse(245, 168, 18, 22); line(260, 157, 260, 179); line(260, 170, 273, 158); line(260, 170, 274, 176); }