{"id":69238,"date":"2021-12-03T12:54:55","date_gmt":"2021-12-03T17:54:55","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/?p=69238"},"modified":"2021-12-03T12:54:55","modified_gmt":"2021-12-03T17:54:55","slug":"final-hurricanes","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/12\/03\/final-hurricanes\/","title":{"rendered":"Final Hurricanes:"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><body><p>My program is an interactive informative video on hurricanes. Climate change is causing hurricanes to become more powerful and I wanted to explore this for this project. I did not really know what I wanted to do for this project when we first got it, but I decided on hurricanes because I have been affected by them. I remember when I was little Hurricane Sandy hitting Connecticut and being without power for weeks. Halloween was cancelled because of power-lines being down and there being over 2 feet of snow. I remember playing cards with my family around candles and putting our food from the freezer out in the snow because we did not have a generator.<\/p>\n\n\n\n<p><br>I wanted to make this project be special to me, but also make people realize that climate change is affecting us, because most people who do not believe climate change is serious does not know how much a degree or two in earths temperature rising can cause.<\/p>\n\n\n\n<p><br>To use my program is simple. All you need to do is use the arrow and shift key when asked to see more information and explore more hurricanes. You can pick what hurricanes to see in any order.<\/p>\n\n\n\n<p><br>If I had more time I think I would have explored adding some sounds, and possibly a conclusion at the end.<\/p>\n\n\n\n<p>Here are some of the images I made:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"708\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/bacteria-708x1024.png\" alt=\"\" class=\"wp-image-69239\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/bacteria-708x1024.png 708w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/bacteria-208x300.png 208w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/bacteria-768x1110.png 768w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/bacteria-1063x1536.png 1063w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/bacteria.png 1091w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\"><figcaption>bacteria<\/figcaption><\/figure><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"998\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/tornado-998x1024.png\" alt=\"\" class=\"wp-image-69240\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/tornado-998x1024.png 998w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/tornado-292x300.png 292w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/tornado-768x788.png 768w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/tornado-1200x1231.png 1200w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/tornado.png 1264w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\"><figcaption>tornado<\/figcaption><\/figure><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"547\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/Mudslide-1024x547.png\" alt=\"\" class=\"wp-image-69241\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/Mudslide-1024x547.png 1024w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/Mudslide-300x160.png 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/Mudslide-768x411.png 768w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/Mudslide-1536x821.png 1536w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/Mudslide-2048x1095.png 2048w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/Mudslide-1200x642.png 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\"><figcaption>mudslide<\/figcaption><\/figure><p>(my code is 800&times;800 so it is a bit cut off here).<\/p>\n\n\n\n<p><a class=\"p5_sketch_link\" data-width=\"800\" data-height=\"800\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/sketch.js\">file<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"800\" height=\"800\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">var dirY = 10;\nvar xCenter = 35;\nvar yCenter = 26;\nvar size1 = 30;\nvar size2 = 75;\nvar psize = 1;\nvar hsize = 1;\nvar winds = [];\nvar offset = 0;\nvar a = 0;\nvar b = 0;\nvar x = []; \/\/for bacteria\nvar y = []; \/\/for bacteria\nvar dx = []; \/\/for bacteria\nvar bacteria = []; \nvar changeHurricane = 0;\nvar counter= 0;\nvar time = 50;\n\nfunction preload() {\n    bacteriaImg  = loadImage(\"https:\/\/i.imgur.com\/1A8JGL4.png\");\n    harveyImg = loadImage(\"https:\/\/i.imgur.com\/EpbTXxl.png\");\n    hurricaneImg = loadImage(\"https:\/\/i.imgur.com\/odCOO2g.png\");\n    irmaImg = loadImage(\"https:\/\/i.imgur.com\/1bhgnMC.png\");\n    katrinaImg = loadImage(\"https:\/\/i.imgur.com\/US5Kww2.png\");\n    mapImg = loadImage(\"https:\/\/i.imgur.com\/dOw7Qhi.png\");\n    mudslideImg = loadImage(\"https:\/\/i.imgur.com\/mvmq6d4.png\");\n    peopleImg = loadImage(\"https:\/\/i.imgur.com\/6md7EQY.png\");\n    powerlinesImg = loadImage(\"https:\/\/i.imgur.com\/fceH7Sn.png\");\n    SandyImg  = loadImage(\"https:\/\/i.imgur.com\/v3yDJ4E.png\");\n    shorelineImg  = loadImage(\"https:\/\/i.imgur.com\/b8jOnfe.png\");\n    snowImg  = loadImage(\"https:\/\/i.imgur.com\/o4kwP6r.png\");\n    tornadoImg  = loadImage(\"https:\/\/i.imgur.com\/fQdemYk.png\");\n    sickbedImg  = loadImage(\"https:\/\/i.imgur.com\/f3pLBpr.png\");\n    wasteFacilityImg  = loadImage(\"https:\/\/i.imgur.com\/DkcHFPS.png\");\n    coastWaterImg  = loadImage(\"https:\/\/i.imgur.com\/Z3WagWz.png\");\n    womenImg = loadImage(\"https:\/\/i.imgur.com\/cYQjOwi.png\");\n}\n\nfunction setup() {\n    createCanvas(800, 800);\n    frameRate(50);\n    var pl = wind(600, 100, 100);\n    winds.push(pl);\n    for(var i = 0; i &lt; 40; i++){\n        bacteria[i] = new Object();\n        bacteria[i].x = random(0, 800);\n        bacteria[i].y = random(0, 500);\n        bacteria[i].dx = random(-5, 5);\n    }\n}\n\nfunction people2(r, c, rw, cw, x, y) {\n    push();\n    translate(0, -490);\n    for(var row = 1; row &lt;= r; row += 1) {\n        for(var col = 1; col &lt;= c; col += 1) {\n            image(peopleImg, (size1 * col) - x, (size2 * row) + y, size1, size2);\n        }\n    }\n    for(var row = 6; row &lt;= rw; row += 1) {\n        for(var col = 1; col &lt;= cw; col += 1) {\n            image(peopleImg, (size1 * col) - x, (size2 * row) + y, size1, size2);\n        }\n    }\n    pop();\n}\n\nfunction drawPeopleScale2(r, c, rw, cw, x, y, z) {\n    push();\n    scale(psize);\n    people2(r, c, rw, cw, x, y);\n    psize = psize - z;\n    pop();\n}\n\nfunction people(r, c, x, y) {\n    push();\n    translate(0, -490);\n    for(var row = 1; row &lt;= r; row += 1) {\n        for(var col = 1; col &lt;= c; col += 1) {\n            image(peopleImg, (size1 * col) - x, (size2 * row) + y, size1, size2);\n        }\n    }\n    pop();\n}\n\nfunction drawPeopleScale(r, c, x, y, z) {\n    push();\n    scale(psize);\n    people(r, c , x, y);\n    psize = psize - z;\n    pop();\n}\n\n\n\nfunction powerlines() {\n    image(powerlinesImg, 300, 260, 400, 326);\n}\n\nfunction risingSeas(c, d) {\n    fill(0, 0, 255);\n    rect(0, d - dirY, 800, 1500);\n    dirY = dirY + c;\n}\n\nfunction houses4flooding(c, d) {\n    push();\n    fill(255);\n    scale(6);\n    risingSeas(c, d);\n    for(var col = 1; col &lt;= 3; col += 1) {\n        triangle((xCenter * col) - 5, 20 + yCenter, (xCenter * col) - 20, yCenter + 37, (xCenter * col) + 10, 15 + yCenter + 22);\n        rect((xCenter * col) - 20, 37 + yCenter, 30, 25);\n        rect((xCenter * col) - 8, 52 + yCenter, 10, 10);\n    }\n    pop();\n\n}\n\nfunction drawHouseOG() {\n    push();\n    fill(255);\n    scale(8);\n    triangle(15 + xCenter, 0 + yCenter, 0 + xCenter, 15 + yCenter, 30 + xCenter, 15 + yCenter);\n    rect(0 + xCenter, 15 + yCenter, 30, 25);\n    rect(12 + xCenter, 30 + yCenter, 10, 10);\n    pop();\n}\n\nfunction drawHouse(r, c) {\n    push();\n    fill(255);\n    for(var row = 1; row &lt;= r; row += 2){\n        for(var col = 1; col &lt;= c; col += 1){ \/\/draw house numbers\n            triangle((15 + xCenter * col) - 30, (0 + yCenter * row) - 2000, (xCenter * col) - 30, (15 + yCenter * row) - 2000, (30 + xCenter * col) - 30, (15 + yCenter * row) - 2000);\n            rect((xCenter * col) - 30, (15 + yCenter * row) - 2000, 30, 25);\n            rect((12 + xCenter * col) - 30, (30 + yCenter * row) - 2000, 10, 10);\n        }\n    }\n    pop();\n}\n\nfunction drawHouseScale(r, c, z) {\n    push();\n    scale(hsize);\n    drawHouse(r, c);\n    hsize = hsize - z;\n    pop();\n\n}\n\nfunction stormSurge(y, w, h) {\n    push();\n    noStroke();\n    fill(0, 0, 255);\n    rect(0, y, w, h)\n    pop();\n    drawHouseOG();\n}\n\nfunction bacteriaWater(b) {\n    image(bacteriaImg, b.x, b.y, 50, 72.3);\n}\n\nfunction tornadoes() {\n    for(var col = 1; col &lt;= 5; col += 1){\n        image(tornadoImg,  (150 * col) - 130, 190, 150, 154);\n    }\n}\n\nfunction wind(px, py, pw) {\n    var p = {x: px, y: py, w: pw,\n    right: windRight};\n    return p;\n}\n\nfunction windRight() {\n    return this.x + this.w;\n}\n\nfunction risingTemperature() {\n    fill(0 + a, 0, 255 - a)\n    rect(0, -height \/ 3, 800, 800)\n    a = a + 5;\n}\n\nfunction coastalRise() {\n    image(shorelineImg, 0, 100, 800, 453.23)\n    image(coastWaterImg, 440 - b, 135, 1200, 406.23);\n    b = b + 3;\n}\n\nfunction circlesForMap() {\n    noStroke();\n    fill(0, 153, 153); \/\/teal\n    circle(660, 320, 40, 40); \/\/irma\n    fill(0, 76, 153); \/\/blue\n    circle(680, 75, 40, 40); \/\/sandy\n    fill(0, 153, 0); \/\/green\n    circle(520, 270, 40, 40); \/\/katrina\n    fill(102, 102, 0); \/\/mustard\n    circle(450, 280, 40, 40); \/\/Harvey\n}\n\nfunction sandy() {\n    fill(180)\n    rect(0, 0, width, height);\n    fill(255);\n    translate(0, height\/3);\n    textSize(12);\n    textFont('Georgia');\n    if(counter &lt;= time * 5) {\n        text(\"Hurricane Sandy,\", 50, 15);\n        text(\"October 30-31, 2012\", 50, 30); \/\/show map of area\n        image(SandyImg, 0, -300, 800, 1151.22)\n    }\n\n    if(counter &lt;= time * 9 & counter > time * 5) {\n        text(\"Hurricane Sandy is the largest Atlantic Hurricane on record.\", 50, 15);\n    }\n    if(counter &lt;= time * 14 & counter > time * 9) {\n        people2(12, width, 13, 15, 30, -1);\n        push();\n        fill(0);\n        text(\"Loss of Life: 285\", 50, 15); \/\/loop many people \n        pop();\n    }\n    if(counter &lt;= time * 19 & counter > time * 14) {\n        text(\"extreme highwind damage\", 50, 15); \/\/wind do in final folder\n        for (var i = 0; i &lt; winds.length; i++) {\n            var p = winds[i];\n            rect(p.x - offset, p.y, p.w, 10);\n        }\n        offset += 90;\n        if (winds.length &gt; 0 & winds[0].right() < offset) {\n            winds.shift();\n        }\n        var lastWind = winds[winds.length-1];\n        if (lastWind.right() - offset &lt; width) {\n            var p = wind(lastWind.right(), \/\/ start location\n            random(-height\/3, height), 100); \n            winds.push(p); \n        }\n    }\n\n    if(counter &lt;= time * 24 & counter > time * 19) {\n        text(\"Storm surge levels up to almost 14ft\", 50, 15); \/\/people with water level \n        stormSurge(400, 800, 140);\n    }\n    if(counter &lt;= time * 29 & counter > time * 24) {\n        text(\"heavy snow damage\", 50, 15); \/\/snow image \n        image(snowImg, -130, -220, 1000, 800);\n    }\n    if(counter &lt;= time * 34 & counter > time * 29) {\n        houses4flooding(.6, 420);\n        text(\"flooding\", 50, 15); \/\/display water over houses, use loops for houses\n    }\n    if(counter &lt;= time * 38 & counter > time * 34) {\n        text(\"mudslides\", 50, 15); \/\/show mudslide image \n        image(mudslideImg, 0, 105, 800, 427.7);\n    }\n    if(counter &lt;= time * 42 & counter > time * 38) {\n        text(\"8 million people lost power\", 50, 15); \/\/power lines\n        powerlines();\n    }\n    if(counter &lt;= time * 44 & counter > time * 42) {\n        drawHouseScale(250, 160, .008);\n        push();\n        fill(0);\n        textSize(18);\n        text(\"20,000+ households were still displaced even after one year.\", 50, 15); \/\/house \n        pop();\n    }\n    if(counter &gt; time * 44){ \n        text(\"click the shift key to return to map to explore more\", 50, 15);\n    }\n}\n\nfunction katrina() {\n    fill(180)\n    rect(0, 0, width, height);\n    fill(255);\n    translate(0, height\/3);\n    textSize(12);\n    textFont('Georgia');\n    if(counter &lt;= time * 5) {\n        text(\"Hurricane Katrina\", 50, 15);\n        text(\"August 23-30, 2005\", 50, 30); \/\/show map of area\n        image(katrinaImg, 0, -320, 800, 1151.22)\n    }\n    if(counter &lt;= time * 10 & counter > time * 5) {\n        push();\n        fill(0);\n        drawPeopleScale2(24, 75, 25, 33, -50, -200, .006);\n        text(\"Loss of Life: 1833\", 50, 15); \/\/loop many people \n        pop();\n    }\n    if(counter &lt;= time * 14 & counter > time * 10) {\n        text(\"Storm surge levels up to 30ft\", 50, 15); \/\/compare to house \n        stormSurge(200, 800, 400);\n    }\n    if(counter &lt;= time * 19 & counter > time * 14) {\n        text(\"wind damage\", 50, 15); \/\/show wind in final folder\n        for (var i = 0; i &lt; winds.length; i++) {\n            var p = winds[i];\n            rect(p.x - offset, p.y, p.w, 10);\n        }\n        offset += 70;\n        if (winds.length &gt; 0 & winds[0].right() < offset) {\n           winds.shift();\n        }\n        var lastWind = winds[winds.length-1];\n        if (lastWind.right() - offset &lt; width) {\n            var p = wind(lastWind.right(), \/\/ start location\n            random(-height\/3, height), 100); \n            winds.push(p); \n        }\n    }\n    if(counter &lt;= time * 23 & counter > time * 19) { \n        houses4flooding(.1, 420);\n        text(\"flooding\", 50, 15); \/\/display water over houses, use loops for houses \n    }\n    if(counter &lt;= time * 30 & counter > time * 23) {\n        push();\n        fill(0, 0, 255);\n        rect(0, 0, 800, 800);\n        pop();\n        for(var i = 0; i &lt; 40; i++){\n            bacteriaWater(bacteria[i]);\n            bacteria[i].x = bacteria[i].x + bacteria[i].dx;\n            pop();\n        }\n        text(\"an absense of sanitation and bacteria-rich flood waters caused a public emergency\", 50, 15); \/\/bacteria in water \n    }\n    if(counter &lt;= time * 34 & counter > time * 30) {\n        image(peopleImg, size1 + 200, 150, size1 * 5, size2 * 5);\n        image(womenImg, size1 * 7 + 200, 150, size1 * 5, size2 * 5);\n        fill(0);\n        text(\"30,000 people seeking shelter under New Orleans Super Dome\", 50, 15); \/\/people and women\n    }\n    if(counter &lt;= time * 39 & counter > time * 34) {\n        image(peopleImg, size1 + 200, 150, size1 * 5, size2 * 5);\n        image(womenImg, size1 * 7 + 200, 150, size1 * 5, size2 * 5);\n        fill(0); \n        text(\"and 25,000 people seeking shelter under the Convention Center\", 50, 15); \/\/people and women\n    }\n    if(counter &gt; time * 39) {\n        text(\"click the shift key to return to map to explore more\", 50, 15);\n    }\n}\n\nfunction harvey() {\n    fill(180)\n    rect(0, 0, width, height);\n    fill(255);\n    translate(0, height\/3);\n    textSize(12);\n    textFont('Georgia');\n    if(counter &lt;= time * 5) {\n        text(\"Hurricane Harvey\", 50, 15);\n        text(\"August 25-31, 2017\", 50, 30);\/\/show map of area\n        image(harveyImg, 0, -320, 800, 1151.22);\n    }\n    if(counter &lt;= time * 9 & counter > time * 5) {\n        push();\n        fill(0);\n        people2(8, 11, 9, 1, -200, 225);\n        text(\"Loss of Life: 89\", 50, 15); \/\/loop many people dome\n        pop();\n    }\n    if(counter &lt;= time * 14 & counter > time * 9) {\n        text(\"12.5ft storm surge\", 50, 15); \/\/show with people\n        stormSurge(420, 800, 120);\n    }\n    if(counter &lt;= time * 19 & counter > time * 14) {\n        houses4flooding(.1, 420);\n        text(\"extreme rainfall caused massive flooding\", 50, 15); \/\/houses and water\n    }\n    if(counter &lt;= time * 23 & counter > time * 19) {\n        fill(0);\n        drawPeopleScale(150, 300, 20, 50, .006);\n        text(\"displacing over 30,000\", 50, 15);\n    }\n    if(counter &lt;= time * 23.5 & counter > time * 23) {\n        fill(0);\n        drawHouseScale(500, 400, .05);\n        text(\"destroying over 200,000 households and businesses.\", 50, 15); \/\/houses\n    }\n    if(counter &lt;= time * 27.5 & counter > time * 23.5) {\n        text(\"Harvey flooded 800 waste-water treatment facilities\", 50, 15); \/\/treatment facility \n        image(wasteFacilityImg, 100, 100, 600, 339);\n    }\n    if(counter &lt;= time * 34 & counter > time * 27.5) { \n        push();\n        fill(0, 0, 255);\n        rect(0, 0, 800, 800);\n        pop();\n        for(var i = 0; i &lt; 40; i++){\n            bacteriaWater(bacteria[i]);\n            bacteria[i].x = bacteria[i].x + bacteria[i].dx;\n            pop();\n        }\n         text(\"spreading sewage and toxic chemicals into flooded areas\", 50, 15); \/\/bacteria in water \n    }\n    if(counter &lt;= time * 41 & counter > time * 34) { \n        image(sickbedImg, -20, -300, 800, 1151.2);\n        text(\"disruption to water supplies and power systems caused water borne illness\", 50, 15); \/\/sick bed \n    }\n    if(counter &gt; time * 41) {\n        text(\"click the shift key to return to map to explore more\", 50, 15);\n    }\n}\n\nfunction irma() {\n    fill(180)\n    rect(0, 0, width, height);\n    fill(255);\n    translate(0, height\/3);\n    textSize(12);\n    textFont('Georgia');\n    if(counter &lt;= time * 5) {\n        text(\"Hurricane Irma\", 50, 15);\n        text(\"September 6-12, 2017\", 50, 30);\/\/show map of area\n        image(irmaImg, 0, -300, 800, 1151.22);\n    }\n    if(counter &lt;= time * 9 & counter > time * 5) {\n        push();\n        fill(0);\n        people2(5, 26, 6, 4, 20, 325);\n        text(\"Loss of Life: 134\", 50, 15); \/\/loop many people \n        pop();\n    }\n    if(counter &lt;= time * 14 & counter > time * 9) {\n        text(\"severe wind\", 50, 15); \/\/wind but faster\n        for (var i = 0; i &lt; winds.length; i++) {\n            var p = winds[i];\n             rect(p.x - offset, p.y, p.w, 10);\n        }\n        offset += 70;\n        if (winds.length &gt; 0 & winds[0].right() < offset) {\n            winds.shift();\n        }\n        var lastWind = winds[winds.length-1];\n        if (lastWind.right() - offset &lt; width) {\n            var p = wind(lastWind.right(), \/\/ start location\n            random(-height\/3, height), 100); \n            winds.push(p); \n        }\n    }\n    if(counter &lt;= time * 19 & counter > time * 14) {\n        text(\"five tornadoes formed in South Florida causing more damage\", 50 ,15);\n        tornadoes();\n    }\n    if(counter &lt;= time * 24 & counter > time * 19) {\n        text(\"max wind sustained was 185 mph for 37 hours\", 50, 15); \/\/faster faster wind\n        for (var i = 0; i &lt; winds.length; i++) {\n            var p = winds[i];\n            rect(p.x - offset, p.y, p.w, 10);\n        }\n        offset += 99;\n        if (winds.length &gt; 0 & winds[0].right() < offset) {\n           winds.shift();\n        }\n        var lastWind = winds[winds.length-1];\n        if (lastWind.right() - offset &lt; width) {\n            var p = wind(lastWind.right(), \/\/ start location\n            random(-height\/3, height), 100); \n            winds.push(p); \n        }\n    }\n    if(counter &lt;= time * 28 & counter > time * 24) {\n        text(\"1.5 million people lost power\", 50, 15); \/\/power lines \n        powerlines();\n        }\n    if(counter &lt;= time * 28.6 & counter > time * 28) {\n        drawHouseScale(500, 266, .05);\n        fill(0);\n        text(\" and 133,000 homes were affected\", 50, 15); \/\/homes\n    }\n    if(counter &gt; time * 28.6) {\n        text(\"click the shift key to return to map to explore more\", 50, 15);\n    }\n}\n\nfunction startText() {\n    fill(255);\n    translate(0, height\/3);\n    textSize(12);\n    textFont('Georgia');\n    if(counter &lt;= time * 3){\n        text(\"Climate Change is ruining our planet, and we are the ones to blame.\", 50, 15);\n    }\n    if(counter &lt;= time * 5 & counter > time * 3){\/\/image here\n        text(\"seas are rising,\", 50, 15);\n        risingSeas(3, 420);\n    }\n    if(counter &lt;= time * 7 & counter > time * 5){ \n        push();\n        risingTemperature();\n        pop();\n        text(\"tempetures are rising,\", 50 ,15);\n    }\n    if(counter &lt;= time * 10 & counter > time * 7){ \n        image(hurricaneImg, 0, -200, 800, 609,23);\n        push();\n        fill(145);\n        text(\"and hurricanes are becoming more intense.\", 150, 15);\n        pop();\n    }\n    if(counter &lt;= time * 15 & counter > time * 10){\n        push();\n        risingSeas(.1, 420);\n        drawHouseOG();\n        pop();\n        text(\"hurricanes are and will cause extreme flooding\", 50, 15);\n    }\n    if(counter &lt;= time * 20 & counter > time * 15){ \/\/function here\n        text(\"and intense wind;\", 50, 15);\n        for (var i = 0; i &lt; winds.length; i++) {\n            var p = winds[i];\n            rect(p.x - offset, p.y, p.w, 10);\n        }\n        offset += 50;\n        if (winds.length &gt; 0 & winds[0].right() < offset) {\n            winds.shift();\n        }\n        var lastWind = winds[winds.length-1];\n        if (lastWind.right() - offset &lt; width) {\n            var p = wind(lastWind.right(), \/\/ start location\n            random(-height\/3, height), 100); \n            winds.push(p); \n        }\n    }\n    if(counter &lt;= time * 25 & counter > time * 20){ \/\/image here\n        text(\"causing massive coastal damage.\", 50, 15);\n        coastalRise();\n    }\n    if(counter &gt; time * 25){ \/\/20 seconds to choose hurricane before intro restart\n        image(mapImg, 0, -450, 800, 1151.22);\n        text(\"KeyPress to discover the destruction of some of the last two decades worst hurricanes.\", 50, -215);\n        fill(0, 76, 153);\n        text(\"press up arrow on keyboard to see statistics of Hurricane Sandy\", 50, -200);\n        fill(0, 153, 153);\n        text(\"press down arrow on keyboard to see statistics of Hurricane Irma\", 50, -185);\n        fill(0, 153, 0);\n        text(\"press right arrow on keyboard to see statistics of Hurricane Katrina\", 50, -170);\n        fill(102, 102, 0);\n        text(\"press up left on keyboard to see statistics of Hurricane Harvey\", 50, -155);\n        circlesForMap();\n    }\n}\n\nfunction draw() {\n    background(180);\n    push();\n    startText();\n    pop();\n    if(changeHurricane == 1){\n        fill(180)\n        rect(0, 0 - 267, width, height);\n        sandy();\n    }\n    if(changeHurricane == 2){\n        fill(180)\n        rect(0, -267, width, height);\n        katrina();\n    }\n    if(changeHurricane == 3){\n        fill(180)\n        rect(0, -267, width, height);\n        harvey();\n    }\n    if(changeHurricane == 4){\n        fill(180)\n        rect(0, -267, width, height);\n        irma();\n    }\n    if(changeHurricane == 5){ \/\/for map\n        fill(180)\n        rect(0, -height\/3 + 267, width, height);\n        image(mapImg, 0, -190, 800, 1151.22);\n        fill(255);\n        text(\"KeyPress to discover the destruction of some of the last two decades worst hurricanes.\", 50, 52);\n        fill(0, 76, 153);\n        text(\"press up arrow on keyboard to see statistics of Hurricane Sandy\", 50, 67);\n        fill(0, 153, 153);\n        text(\"press down arrow on keyboard to see statistics of Hurricane Irma\", 50, 82);\n        fill(0, 153, 0);\n        text(\"press right arrow on keyboard to see statistics of Hurricane Katrina\", 50, 97);\n        fill(102, 102, 0);\n        text(\"press up left on keyboard to see statistics of Hurricane Harvey\", 50, 112);\n        push();\n        translate(0, 267);\n        circlesForMap();\n        pop();\n    }\n    counter+=1\n }\n\n function keyPressed() {\n    counter = 0;\n    if (keyCode == UP_ARROW) {\n        changeHurricane = 1;\n    }\n    if (keyCode == RIGHT_ARROW) {\n        changeHurricane =  2;\n    }\n    if (keyCode == LEFT_ARROW) {\n        changeHurricane = 3;\n    }\n    if (keyCode == DOWN_ARROW) {\n        changeHurricane = 4;\n    }\n    if (keyCode == SHIFT){\n        changeHurricane = 5;\n    }\n }\n\n\n\n\n \/\/Links to info used:\n \/\/https:\/\/www.c2es.org\/content\/extreme-weather-and-climate-change\/ \n \/\/https:\/\/www.dosomething.org\/us\/facts\/11-facts-about-hurricane-sandy\n \/\/https:\/\/www.britannica.com\/event\/Hurricane-Katrina\n \/\/https:\/\/www.lamar.edu\/_files\/documents\/resilience-recovery\/grant\/recovery-and-resiliency\/hurric2.pdf\n \/\/https:\/\/www.weather.gov\/mfl\/hurricaneirma\n \/\/https:\/\/www.worldvision.org\/disaster-relief-news-stories\/2017-hurricane-irma-facts \n<\/code><\/pre><\/p>\n\n\n\n<p><\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>My program is an interactive informative video on hurricanes. Climate change is causing hurricanes to become more powerful and I wanted to explore this for this project. I did not really know what I wanted to do for this project when we first got it, but I decided on hurricanes because I have been affected &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/12\/03\/final-hurricanes\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Final Hurricanes:&#8221;<\/span><\/a><\/p>\n","protected":false},"author":660,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[116,58],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/69238"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/users\/660"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/comments?post=69238"}],"version-history":[{"count":2,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/69238\/revisions"}],"predecessor-version":[{"id":69247,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/69238\/revisions\/69247"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/media?parent=69238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/categories?post=69238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/tags?post=69238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}