{"id":69413,"date":"2021-12-04T22:28:42","date_gmt":"2021-12-05T03:28:42","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/?p=69413"},"modified":"2021-12-04T22:28:42","modified_gmt":"2021-12-05T03:28:42","slug":"final-project-11","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/12\/04\/final-project-11\/","title":{"rendered":"Final Project"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><body><div class=\"wp-block-file\"><\/div>\n\n\n\n<div class=\"wp-block-file\"><a class=\"p5_sketch_link\" data-width=\"800\" data-height=\"500\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/12\/sketch-26.js\">sketch<\/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=\"500\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/ WARNING: FOR SOME REASON THE PROGRAM IS VERY LAGGY ON CHROME. HOWEVER, WORKS VERY SMOOTHLY WITH SAFARI.\n\nvar trash=[\"https:\/\/i.imgur.com\/4OExNH5.png\", \"https:\/\/i.imgur.com\/mNxZdnx.png\", \"https:\/\/i.imgur.com\/2utBIl1.png\", \"https:\/\/i.imgur.com\/onA6aUl.png\"];\nvar recyclebin=[\"https:\/\/i.imgur.com\/p6HfTlh.png\"];\nvar canfact=['https:\/\/i.imgur.com\/PUJEJM4.png'];\nvar milkfact=['https:\/\/i.imgur.com\/C5jKZj9.png'];\nvar waterfact =['https:\/\/i.imgur.com\/VcUrBbs.png'];\nvar winefact =['https:\/\/i.imgur.com\/pWmodnq.png'];\nvar background =['https:\/\/i.imgur.com\/Mz0ml4E.png'];\n\nvar trash1;\nvar trash2; \nvar trash3;\nvar trash4;\nvar speed= 7;\n\nvar place=[];\nvar ntrash=200;\nvar x=0;\nvar speed=7;\n\nfunction preload() {\n    trash1=loadImage(trash[0]); \/\/ wine\n    trash2=loadImage(trash[1]); \/\/ water\n    trash3=loadImage(trash[2]); \/\/ milk \n    trash4=loadImage(trash[3]); \/\/ can\n    recyclebin = loadImage('https:\/\/i.imgur.com\/p6HfTlh.png');\n    background = loadImage('https:\/\/i.imgur.com\/Mz0ml4E.png')\n\n    winefact = loadImage('https:\/\/i.imgur.com\/pWmodnq.png');\n    waterfact = loadImage('https:\/\/i.imgur.com\/VcUrBbs.png');\n    milkfact = loadImage('https:\/\/i.imgur.com\/C5jKZj9.png');\n    canfact = loadImage('https:\/\/i.imgur.com\/PUJEJM4.png');\n}\n\nfunction setup() {\n    createCanvas(800, 500);\n    var n = 0;\n    for (var i = 0; i &lt; 1000; i++){ \/\/\n        place[i] = makePlace(n);\n        n -= 200;\n    }\n    frameRate(30);\n}\n\nfunction draw() {\n    image(background,0,0);\n    placeShow(); \n    image(recyclebin, mouseX, mouseY);\n\n    if (mouseIsPressed & mouseX<400 && mouseY<250) {\n        image(winefact, 0, 0);\n    } \n\n    if (mouseIsPressed & mouseX>400 && mouseY<250) {\n        image(waterfact,0,0);\n    }\n\n    if (mouseIsPressed & mouseX<400 && mouseY>240) {\n        image(milkfact,0,0);\n    }\n\n    if (mouseIsPressed & mouseX>400 && mouseY>250) {\n        image(canfact,0,0);\n    }\n}\n\nfunction placeGo(){\n    this.x+=this.dx;\n}\nfunction placeShow(){\n    for(var i = 0; i &lt; place.length; i++){\n        place[i].go();\n        place[i].show();\n        \/\/ plate[i].mP();\n    }\n}\n\nfunction makePlace(px){\n    var place={x: px, y:1, w:1, h:1,\n    dx: 7, go:placeGo, show:drawPlace,\n    trash: random([trash1, trash2, trash3, trash4]),\n    }\n    return place;\n}\n\nfunction drawPlace(){\n    push();\n    fill(0);\n    noStroke();\n    ellipse(this.x, this.y, this.w, this.h);\n    stroke(185);\n    noFill();\n    ellipse(this.x, this.y, 0.75*this.w, 0.75*this.h);\n    if (this.trash==trash1){\n            image(trash1, this.x-50, 0);\n        }\n    if (this.trash==trash2){\n        image(trash2, this.x-50, 0);\n         }\n    if (this.trash==trash3){\n        image(trash3, this.x-50, 0);\n         }\n    if (this.trash==trash4){\n        image(trash4, this.x-50, 0);\n         } \n\nfunction keyPressed() {\n  clear();\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>For my final project I decided to narrow in specifically of human consumption waste and recycling. The program is a conveyer belt of a recycling incinerator, the images are all hand drawn through illustrator and procreate. It is simple to run, when you click the screen different facts about the 4 different products will show up: cardboard, glass, plastic, and metal. I also included the mouse to be a recycling bin to add as context clues to what is happening. The art style I was inspired by is my color palette for my animations I do for design. If I had more time I would make buttons which correlate to the random recyclable material functions and have each fact correlate. I would also make a larger frame to show the recycling process and make it much larger than just one simple conveyer belt.<br>Please Note:<br>The program works very smoothly with safari but is very laggy on chrome. (I already checked in with a TA about this)<\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>For my final project I decided to narrow in specifically of human consumption waste and recycling. The program is a conveyer belt of a recycling incinerator, the images are all hand drawn through illustrator and procreate. It is simple to run, when you click the screen different facts about the 4 different products will show &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/12\/04\/final-project-11\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Final Project&#8221;<\/span><\/a><\/p>\n","protected":false},"author":664,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[57],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/69413"}],"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\/664"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/comments?post=69413"}],"version-history":[{"count":2,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/69413\/revisions"}],"predecessor-version":[{"id":69416,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/69413\/revisions\/69416"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/media?parent=69413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/categories?post=69413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/tags?post=69413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}