/* Emerson Simmonds The Sea Plane *Modeled off Porco Rossos Plane* Raise the plane to pull away from the water Lower to skim the water, at which point the effect will become visible Fly around the screen to see the parallax effect that I thought would make flying the plane around more fun Hold down a key to create vapor trails Press the mouse buttons to get a radio communication */ void setup() { //Initialization size(400, 400); //Setup the window noCursor(); } void draw() { //Main drawing loop background(94, 132, 197); //Set background color to ocean blue /* SEA */ // Center dots //Meant to create the effect of motion on the water when your skimming over it noStroke(); fill(10, 27, 56, mouseY*0.2); //Dark dots ellipse(100, 1 + frameCount*15%445, 4, 10); ellipse(105, 1 + frameCount*15%434, 4, 10); ellipse(110, 1 + frameCount*15%472, 4, 10); ellipse(115, 1 + frameCount*15%473, 4, 10); ellipse(120, 1 + frameCount*15%462, 4, 10); ellipse(125, 1 + frameCount*15%453, 4, 10); ellipse(130, 1 + frameCount*15%436, 4, 10); ellipse(135, 1 + frameCount*15%415, 4, 10); ellipse(140, 1 + frameCount*15%424, 4, 10); ellipse(145, 1 + frameCount*15%446, 4, 10); ellipse(150, 1 + frameCount*15%414, 4, 10); ellipse(155, 1 + frameCount*15%423, 4, 10); ellipse(160, 1 + frameCount*15%434, 4, 10); ellipse(165, 1 + frameCount*15%450, 4, 10); ellipse(170, 1 + frameCount*15%487, 4, 10); ellipse(175, 1 + frameCount*15%423, 4, 10); ellipse(180, 1 + frameCount*15%410, 4, 10); ellipse(185, 1 + frameCount*15%430, 4, 10); ellipse(190, 1 + frameCount*15%420, 4, 10); ellipse(195, 1 + frameCount*15%520, 4, 10); ellipse(200, 1 + frameCount*15%470, 4, 10); ellipse(205, 1 + frameCount*15%460, 4, 10); ellipse(210, 1 + frameCount*15%500, 4, 10); ellipse(215, 1 + frameCount*15%450, 4, 10); ellipse(220, 1 + frameCount*15%510, 4, 10); ellipse(225, 1 + frameCount*15%480, 4, 10); ellipse(230, 1 + frameCount*15%474, 4, 10); ellipse(235, 1 + frameCount*15%435, 4, 10); ellipse(240, 1 + frameCount*15%445, 4, 10); ellipse(245, 1 + frameCount*15%423, 4, 10); ellipse(250, 1 + frameCount*15%496, 4, 10); ellipse(255, 1 + frameCount*15%423, 4, 10); ellipse(260, 1 + frameCount*15%412, 4, 10); ellipse(265, 1 + frameCount*15%434, 4, 10); ellipse(270, 1 + frameCount*15%444, 4, 10); ellipse(275, 1 + frameCount*15%435, 4, 10); ellipse(280, 1 + frameCount*15%493, 4, 10); ellipse(285, 1 + frameCount*15%512, 4, 10); ellipse(290, 1 + frameCount*15%560, 4, 10); ellipse(295, 1 + frameCount*15%410, 4, 10); ellipse(300, 1 + frameCount*15%440, 4, 10); fill(200, 202, 224, mouseY*0.2); //Light dots ellipse(100, 1 + frameCount*15%432, 4, 10); ellipse(105, 1 + frameCount*15%465, 4, 10); ellipse(110, 1 + frameCount*15%434, 4, 10); ellipse(115, 1 + frameCount*15%413, 4, 10); ellipse(120, 1 + frameCount*15%456, 4, 10); ellipse(125, 1 + frameCount*15%434, 4, 10); ellipse(130, 1 + frameCount*15%433, 4, 10); ellipse(135, 1 + frameCount*15%456, 4, 10); ellipse(140, 1 + frameCount*15%464, 4, 10); ellipse(145, 1 + frameCount*15%421, 4, 10); ellipse(150, 1 + frameCount*15%423, 4, 10); ellipse(155, 1 + frameCount*15%434, 4, 10); ellipse(160, 1 + frameCount*15%456, 4, 10); ellipse(165, 1 + frameCount*15%416, 4, 10); ellipse(170, 1 + frameCount*15%473, 4, 10); ellipse(175, 1 + frameCount*15%483, 4, 10); ellipse(180, 1 + frameCount*15%423, 4, 10); ellipse(185, 1 + frameCount*15%456, 4, 10); ellipse(190, 1 + frameCount*15%434, 4, 10); ellipse(195, 1 + frameCount*15%545, 4, 10); ellipse(200, 1 + frameCount*15%464, 4, 10); ellipse(205, 1 + frameCount*15%442, 4, 10); ellipse(210, 1 + frameCount*15%598, 4, 10); ellipse(215, 1 + frameCount*15%493, 4, 10); ellipse(220, 1 + frameCount*15%500, 4, 10); ellipse(225, 1 + frameCount*15%412, 4, 10); ellipse(230, 1 + frameCount*15%432, 4, 10); ellipse(235, 1 + frameCount*15%423, 4, 10); ellipse(240, 1 + frameCount*15%444, 4, 10); ellipse(245, 1 + frameCount*15%443, 4, 10); ellipse(250, 1 + frameCount*15%476, 4, 10); ellipse(255, 1 + frameCount*15%472, 4, 10); ellipse(260, 1 + frameCount*15%423, 4, 10); ellipse(265, 1 + frameCount*15%409, 4, 10); ellipse(270, 1 + frameCount*15%404, 4, 10); ellipse(275, 1 + frameCount*15%425, 4, 10); ellipse(280, 1 + frameCount*15%413, 4, 10); ellipse(285, 1 + frameCount*15%502, 4, 10); ellipse(290, 1 + frameCount*15%520, 4, 10); ellipse(295, 1 + frameCount*15%450, 4, 10); ellipse(300, 1 + frameCount*15%460, 4, 10); //Side dots (Supposed to reduce workload but ended up making it harder) fill(10, 27, 56, mouseY*0.2); //Dark dots ellipse(305, 1 + frameCount*15%445, 4, 10); ellipse(310, 1 + frameCount*15%434, 4, 10); ellipse(315, 1 + frameCount*15%472, 4, 10); ellipse(320, 1 + frameCount*15%473, 4, 10); ellipse(325, 1 + frameCount*15%462, 4, 10); ellipse(330, 1 + frameCount*15%453, 4, 10); ellipse(335, 1 + frameCount*15%436, 4, 10); ellipse(340, 1 + frameCount*15%415, 4, 10); ellipse(345, 1 + frameCount*15%424, 4, 10); ellipse(350, 1 + frameCount*15%446, 4, 10); ellipse(355, 1 + frameCount*15%414, 4, 10); ellipse(360, 1 + frameCount*15%423, 4, 10); ellipse(365, 1 + frameCount*15%434, 4, 10); ellipse(370, 1 + frameCount*15%450, 4, 10); ellipse(375, 1 + frameCount*15%487, 4, 10); ellipse(380, 1 + frameCount*15%423, 4, 10); ellipse(385, 1 + frameCount*15%410, 4, 10); ellipse(390, 1 + frameCount*15%430, 4, 10); ellipse(395, 1 + frameCount*15%420, 4, 10); ellipse(400, 1 + frameCount*15%520, 4, 10); ellipse(400, 1 + frameCount*15%470, 4, 10); ellipse(100, 1 + frameCount*15%460, 4, 10); ellipse(95, 1 + frameCount*15%500, 4, 10); ellipse(90, 1 + frameCount*15%450, 4, 10); ellipse(85, 1 + frameCount*15%510, 4, 10); ellipse(80, 1 + frameCount*15%480, 4, 10); ellipse(75, 1 + frameCount*15%474, 4, 10); ellipse(70, 1 + frameCount*15%435, 4, 10); ellipse(65, 1 + frameCount*15%445, 4, 10); ellipse(60, 1 + frameCount*15%423, 4, 10); ellipse(55, 1 + frameCount*15%496, 4, 10); ellipse(50, 1 + frameCount*15%423, 4, 10); ellipse(45, 1 + frameCount*15%412, 4, 10); ellipse(40, 1 + frameCount*15%434, 4, 10); ellipse(35, 1 + frameCount*15%444, 4, 10); ellipse(30, 1 + frameCount*15%435, 4, 10); ellipse(25, 1 + frameCount*15%493, 4, 10); ellipse(20, 1 + frameCount*15%512, 4, 10); ellipse(15, 1 + frameCount*15%560, 4, 10); ellipse(10, 1 + frameCount*15%410, 4, 10); ellipse(5, 1 + frameCount*15%440, 4, 10); fill(200, 202, 224, mouseY*0.2); //Light dots ellipse(305, 1 + frameCount*15%434, 4, 10); ellipse(310, 1 + frameCount*15%423, 4, 10); ellipse(315, 1 + frameCount*15%492, 4, 10); ellipse(320, 1 + frameCount*15%457, 4, 10); ellipse(325, 1 + frameCount*15%412, 4, 10); ellipse(330, 1 + frameCount*15%434, 4, 10); ellipse(335, 1 + frameCount*15%467, 4, 10); ellipse(340, 1 + frameCount*15%412, 4, 10); ellipse(345, 1 + frameCount*15%445, 4, 10); ellipse(350, 1 + frameCount*15%478, 4, 10); ellipse(355, 1 + frameCount*15%491, 4, 10); ellipse(360, 1 + frameCount*15%423, 4, 10); ellipse(365, 1 + frameCount*15%423, 4, 10); ellipse(370, 1 + frameCount*15%494, 4, 10); ellipse(375, 1 + frameCount*15%418, 4, 10); ellipse(380, 1 + frameCount*15%434, 4, 10); ellipse(385, 1 + frameCount*15%490, 4, 10); ellipse(390, 1 + frameCount*15%423, 4, 10); ellipse(395, 1 + frameCount*15%423, 4, 10); ellipse(400, 1 + frameCount*15%510, 4, 10); ellipse(400, 1 + frameCount*15%423, 4, 10); ellipse(100, 1 + frameCount*15%445, 4, 10); ellipse(95, 1 + frameCount*15%490, 4, 10); ellipse(90, 1 + frameCount*15%423, 4, 10); ellipse(85, 1 + frameCount*15%532, 4, 10); ellipse(80, 1 + frameCount*15%496, 4, 10); ellipse(75, 1 + frameCount*15%454, 4, 10); ellipse(70, 1 + frameCount*15%434, 4, 10); ellipse(65, 1 + frameCount*15%465, 4, 10); ellipse(60, 1 + frameCount*15%510, 4, 10); ellipse(55, 1 + frameCount*15%459, 4, 10); ellipse(50, 1 + frameCount*15%430, 4, 10); ellipse(45, 1 + frameCount*15%445, 4, 10); ellipse(40, 1 + frameCount*15%430, 4, 10); ellipse(35, 1 + frameCount*15%450, 4, 10); ellipse(30, 1 + frameCount*15%469, 4, 10); ellipse(25, 1 + frameCount*15%439, 4, 10); ellipse(20, 1 + frameCount*15%500, 4, 10); ellipse(15, 1 + frameCount*15%530, 4, 10); ellipse(10, 1 + frameCount*15%405, 4, 10); ellipse(5, 1 + frameCount*15%430, 4, 10); //Background stroke(200, 211, 240); //Sky color strokeWeight(400); noFill(); arc(200, (mouseY/4) + 380, 2000, 600, PI*1, PI*2); //Horizon rises and descends with the plane to simulate pulling away from water //Clouds coming in from either side noStroke(); fill(140,140,140); ellipse(-500 + (frameCount*0.5%950), (0.15* mouseY)+ 200, 100, 30); //Left Clouds ellipse(-244 + (frameCount*0.5%855), (0.15* mouseY)+ 150, 300, 50); ellipse(-340 + (frameCount*0.5%1200), (0.15* mouseY)+ 170, 240, 40); ellipse(-200 + (frameCount*0.5%2000), (0.15* mouseY)+ 67, 167, 23); ellipse(-1000 + (frameCount*0.5%10000), (0.15* mouseY)+ 100, 300, 20); ellipse(800 - (frameCount*0.5%950), (0.15* mouseY)+ 100, 100, 30); //Right Clouds ellipse(850 - (frameCount*0.4%1000), (0.15* mouseY)+ 168, 300, 50); ellipse(950 - (frameCount*0.3%1200), (0.15* mouseY)+ 190, 240, 40); ellipse(1000 - (frameCount*0.2%2000), (0.15* mouseY)+ 20, 167, 23); ellipse(1200 - (frameCount*0.1%10000), (0.15* mouseY)+ 200, 300, 20); /*SEA PLANE*/ //Front of the plane //Propellor strokeWeight(0.4); noFill(); stroke(255); //White Propellor arc(mouseX - 10, mouseY-25 + cos(millis()/15)*2, 60, 60, PI*1.95, PI*2.05); //Propellor right arc(mouseX - 10, mouseY-25 + cos(millis()/14.4)*2, 61, 61, PI*1.94, PI*2.06); arc(mouseX - 9, mouseY-25 + cos(millis()/13.3)*2, 62, 62, PI*1.93, PI*2.07); arc(mouseX - 8, mouseY-25 + cos(millis()/12)*2, 63, 63, PI*1.92, PI*2.08); arc(mouseX - 7, mouseY-25 + cos(millis()/18)*2, 64, 64, PI*1.91, PI*2.09); arc(mouseX - 6, mouseY-25 + cos(millis()/16)*2, 65, 65, PI*1.9, PI*2.1); arc(mouseX - 5, mouseY-25 + cos(millis()/14.6)*2, 66, 66, PI*1.9, PI*2.1); arc(mouseX - 4, mouseY-25 + cos(millis()/13)*2, 67, 67, PI*1.89, PI*2.11); arc(mouseX - 3, mouseY-25 + cos(millis()/14.8)*2, 68, 68, PI*1.88, PI*2.12); arc(mouseX - 2, mouseY-25 + cos(millis()/15)*2, 69, 69, PI*1.87, PI*2.13); arc(mouseX - 1, mouseY-25 + cos(millis()/14.5)*2, 70, 70, PI*1.86, PI*2.14); arc(mouseX + 10, mouseY-25 + cos(millis()/15)*2, 60, 60, PI*0.95, PI*1.05); //Propellor left arc(mouseX + 10, mouseY-25 + cos(millis()/14.3)*2, 61, 61, PI*0.94, PI*1.06); arc(mouseX + 9, mouseY-25 + cos(millis()/13.3)*2, 62, 62, PI*0.93, PI*1.07); arc(mouseX + 8, mouseY-25 + cos(millis()/12)*2, 63, 63, PI*0.92, PI*1.08); arc(mouseX + 7, mouseY-25 + cos(millis()/18)*2, 64, 64, PI*0.91, PI*1.09); arc(mouseX + 6, mouseY-25 + cos(millis()/16)*2, 65, 65, PI*0.9, PI*1.1); arc(mouseX + 5, mouseY-25 + cos(millis()/14.6)*2, 66, 66, PI*0.9, PI*1.1); arc(mouseX + 4, mouseY-25 + cos(millis()/13)*2, 67, 67, PI*0.89, PI*1.11); arc(mouseX + 3, mouseY-25 + cos(millis()/14.8)*2, 68, 68, PI*0.88, PI*1.12); arc(mouseX + 2, mouseY-25 + cos(millis()/15)*2, 69, 69, PI*0.87, PI*1.13); arc(mouseX + 1, mouseY-25 + cos(millis()/14.5)*2, 70, 70, PI*0.86, PI*1.14); fill(198, 49, 48); //Sea plane red stroke(0); strokeWeight(2); line(mouseX-5, mouseY+20, mouseX-20, mouseY); //Engine Supports under wing line(mouseX+5, mouseY+20, mouseX+20, mouseY); strokeWeight(1); stroke(198, 49, 48); //Sea plane red line(mouseX-5, mouseY+20, mouseX-20, mouseY); line(mouseX+5, mouseY+20, mouseX+20, mouseY); //Wings stroke(0); strokeWeight(0.4); //Thin line value quad(mouseX -130, mouseY-5, mouseX, mouseY-5, mouseX, mouseY +5, mouseX-130, mouseY); //Wings quad(mouseX +130, mouseY-5, mouseX, mouseY-5, mouseX, mouseY +5, mouseX+130, mouseY); arc(mouseX-128, mouseY-2, 8, 5, PI*0.5, PI*1.5); //Rounded Wing Tips arc(mouseX+128, mouseY-2, 8, 5, PI*1.5, PI*2.5); line(mouseX-120, mouseY-1, mouseX-55, mouseY); //Wing Flap Left line(mouseX-55, mouseY, mouseX-55, mouseY+3); line(mouseX+120, mouseY-1, mouseX+55, mouseY); //Wing Flap Right line(mouseX+55, mouseY, mouseX+55, mouseY+3); ellipse(mouseX+80, mouseY+15, 10, 15); //Wing Buoy right line(mouseX+80, mouseY+10, mouseX+70, mouseY+2); ellipse(mouseX-80, mouseY+15, 10, 15); //Wing Buoy left line(mouseX-80, mouseY+10, mouseX-70, mouseY+2); strokeWeight(2); //Thick line value line(mouseX+80, mouseY+10, mouseX+80, mouseY+2); //Thick struts line(mouseX-80, mouseY+10, mouseX-80, mouseY+2); line(mouseX-20, mouseY, mouseX-5, mouseY-20); //Engine Supports above wing line(mouseX+20, mouseY, mouseX+5, mouseY-20); strokeWeight(1); stroke(198, 49, 48); line(mouseX-20, mouseY, mouseX-5, mouseY-20); line(mouseX+20, mouseY, mouseX+5, mouseY-20); noStroke(); //No outside line rectMode(CENTER); //For easier work with the plane centered on mouse position rect(mouseX, mouseY, 5, 8); //Line Cleaning Rectangle //Engine stroke(0); //Reset to basic lines for engine strokeWeight(0.4); quad(mouseX-15, mouseY-30, mouseX+15, mouseY-30, mouseX+8, mouseY-10, mouseX-8, mouseY-10); //Main engine body ellipse(mouseX, mouseY-15, 18, 22); //Circular body component rectMode(CENTER); //Making sure its Center rect(mouseX-15, mouseY-20, 4, 10); //Vents rect(mouseX+15, mouseY-20, 4, 10); fill(0); //Black interior of vents ellipse(mouseX-15, mouseY-15, 4, 5); ellipse(mouseX+15, mouseY-15, 4, 5); fill(198, 49, 48); //Sea plane red ellipse(mouseX-12, mouseY-28, 10, 12); //Top of engine ellipse(mouseX+12, mouseY-28, 10, 12); //Middle of the plane (parallax 1.025 on the x, 1.015 on the y) strokeWeight(0.4); fill(155, 121, 115); //Helmet Colour ellipse(mouseX*1.025 - 5, (mouseY+10) *1.015, 10, 10 *1.01); //Back of Helmet fill(198, 49, 48); //Sea plane red arc((mouseX *1.025) - 5, ((mouseY + 35) * 1.015), 40, 50, PI*0.9, PI*2.1); //Body of plane fill(131, 94, 80); //Brown bottom of plane triangle(((mouseX * 1.025) - 5), ((mouseY +35) * 1.015), (mouseX-15) * 1.025 -5, (mouseY +50) * 1.015, ((mouseX -18) * 1.025 -5), ((mouseY + 43) * 1.015)); //Water landing mechanism front triangle(((mouseX * 1.025) -5), ((mouseY +35) * 1.015), (mouseX+15) * 1.025 -5, (mouseY +50) * 1.015, (mouseX +18) *1.025 -5, (mouseY + 43) * 1.015 ); //Back of plane (parallax 1.045 on the x, 1.025 on the y) fill(198, 49, 48); //Sea plane red stroke(0); strokeWeight(0.4); arc((mouseX *1.045) - 9, ((mouseY + 35) * 1.025), 30, 40, PI*0.9, PI*2.1); //Body of plane 2 fill(230, 185, 148); //Light underside triangle((mouseX * 1.045)-8, (mouseY +35) * 1.025, mouseX * 1.045 -8, (mouseY +45) * 1.025, (mouseX -15) * 1.045 -8, (mouseY + 40) * 1.025); //Water landing mechanism back fill(213, 123, 74); //Dark underside triangle((mouseX * 1.045)-8, (mouseY +35) * 1.025, mouseX * 1.045 -8, (mouseY +45) * 1.025, (mouseX +15) * 1.045 -8, (mouseY + 40) * 1.025); //Water landing mechanism back strokeWeight(2); //Thick line value line((mouseX+5) * 1.045 -8, (mouseY+30) * 1.025, (mouseX+10) * 1.045 -8, (mouseY+25) * 1.025); //Tail fin Support line((mouseX-5) * 1.045 -8, (mouseY+30) * 1.025, (mouseX-10) * 1.045 -8, (mouseY+25) * 1.025); fill(198, 49, 48); //Sea plane red strokeWeight(0.6); ellipse(mouseX *1.045 - 8, (mouseY+20) * 1.025, 80, 8); //Horizontal Tail Fin ellipse(mouseX *1.045 - 8, (mouseY+10) * 1.025, 2, 50); //Vertical Tail Fin } void keyPressed(){ //Vapour trails on the wings that rise and fall with the y movement stroke(255); strokeWeight(3); line(mouseX-130, mouseY-2, (mouseX*10) -1950, (mouseY*15)+500); //Vapor Trails when keys are pressed line(mouseX+130, mouseY-2, (mouseX*10) -1500, (mouseY*15)+500); } void mousePressed() { print("Porco, the Mama Aiuto Gang is on the move!"); //A radio communication }