{"id":68525,"date":"2021-11-01T13:33:52","date_gmt":"2021-11-01T17:33:52","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/?p=68525"},"modified":"2021-11-01T13:33:52","modified_gmt":"2021-11-01T17:33:52","slug":"project-9-4","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/11\/01\/project-9-4\/","title":{"rendered":"Project 9"},"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><a class=\"p5_sketch_link\" data-width=\"480\" data-height=\"350\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/11\/sketch-3.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=\"480\" height=\"350\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/ gnmarino\n\/\/ Gia Marino\n\/\/ section D\n\nvar img;\n\nfunction preload() {\n    img = loadImage(\"https:\/\/i.imgur.com\/0H1pS9T.jpg\"); \n}\n\nfunction setup() {\n    createCanvas(480, 350);\n    background(220);\n    noStroke();\n    background(255);\n    frameRate(20);\n}\n\nfunction draw() {\n\n    \/\/ captures the color of every 3 pixels and fills the circles\n    for(var x = 0; x &lt; width; x+= 3){\n        for(var y = 0; y &lt;= height + 100; y+= 3){\n\n            var color = img.get(x, y);\n            fill(color);\n\n            \/\/ when mouse pressed the image is less blurred \n            if(mouseIsPressed) { \n                size = random(5);\n                ellipse(x, y, size);\n            } else {\n                size = random(50);\n                ellipse(x, y, size);\n            }\n\n        push();\n        stroke(0);\n        text(\"Press Mouse\", 15, 15);\n        pop();\n\n        }\n    }\n}\n\n<\/code><\/pre><\/p>\n\n\n\n<p>For this project I had a hard time figuring out how to be creativity without overloading my code. This is because I loop my code so many times to create my picture out of dots that when I went in to change things or print things in the loop my computer would just be having to run way too much. Thus, I decided it be cool to make a project where you uncover my face by clicking on the screen rather than adding anymore to the final image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"972\" height=\"716\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/11\/Screen-Shot-2021-11-01-at-1.30.17-PM.png\" alt=\"\" class=\"wp-image-68527\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/11\/Screen-Shot-2021-11-01-at-1.30.17-PM.png 972w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/11\/Screen-Shot-2021-11-01-at-1.30.17-PM-300x221.png 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/11\/Screen-Shot-2021-11-01-at-1.30.17-PM-768x566.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\"><figcaption>Before Doing Anything<\/figcaption><\/figure><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"902\" height=\"588\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/11\/Screen-Shot-2021-11-01-at-1.31.40-PM.png\" alt=\"\" class=\"wp-image-68528\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/11\/Screen-Shot-2021-11-01-at-1.31.40-PM.png 902w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/11\/Screen-Shot-2021-11-01-at-1.31.40-PM-300x196.png 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/11\/Screen-Shot-2021-11-01-at-1.31.40-PM-768x501.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\"><figcaption>After Holding Down the Mouse For 3 Seconds<\/figcaption><\/figure><p><\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>sketch \/\/ gnmarino \/\/ Gia Marino \/\/ section D var img; function preload() { img = loadImage(&#8220;https:\/\/i.imgur.com\/0H1pS9T.jpg&#8221;); } function setup() { createCanvas(480, 350); background(220); noStroke(); background(255); frameRate(20); } function draw() { \/\/ captures the color of every 3 pixels and fills the circles for(var x = 0; x &lt; width; x+= 3){ for(var y = &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/11\/01\/project-9-4\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 9&#8221;<\/span><\/a><\/p>\n","protected":false},"author":658,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[111,58],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/68525"}],"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\/658"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/comments?post=68525"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/68525\/revisions"}],"predecessor-version":[{"id":68530,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/68525\/revisions\/68530"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/media?parent=68525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/categories?post=68525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/tags?post=68525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}