{"id":75023,"date":"2022-11-03T19:28:50","date_gmt":"2022-11-03T23:28:50","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=75023"},"modified":"2022-11-03T19:28:50","modified_gmt":"2022-11-03T23:28:50","slug":"project-9-portrait","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/11\/03\/project-9-portrait\/","title":{"rendered":"Project 9 Portrait"},"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><a class=\"p5_sketch_link\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/sketch.js\" data-width=\"480\" data-height=\"480\">project7<\/a>\n\n\n\n<p>This was pretty fun to think of different ways to create a portrait. Going off the pointillism idea, I tried to think of different shapes that could be used and experiment. I decided to use mousePressed()  to restart with new shapes. I feel they all came out pretty interesting and all the shapes relate to each other differently.<\/p>\n\n\n\n<figure class=\"wp-container-2 wp-block-gallery-1 wp-block-gallery has-nested-images columns-default is-cropped\"><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"882\" height=\"782\" data-id=\"75026\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.08.50-PM.png\" alt=\"\" class=\"wp-image-75026\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.08.50-PM.png 882w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.08.50-PM-300x266.png 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.08.50-PM-768x681.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\"><figcaption>Circles<\/figcaption><\/figure><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"868\" height=\"768\" data-id=\"75025\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.07.13-PM.png\" alt=\"\" class=\"wp-image-75025\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.07.13-PM.png 868w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.07.13-PM-300x265.png 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.07.13-PM-768x680.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\"><figcaption>4s<\/figcaption><\/figure><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"836\" height=\"772\" data-id=\"75024\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.06.05-PM.png\" alt=\"\" class=\"wp-image-75024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.06.05-PM.png 836w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.06.05-PM-300x277.png 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-03-at-7.06.05-PM-768x709.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\"><figcaption>Triangles<\/figcaption><\/figure><\/figure><p><\/p><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"480\" height=\"480\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/Rachel Legg \/ rlegg \/ Section C\n\nvar img;\nvar option = 1;\n\n\/\/load image\nfunction preload(){\n    \/\/photo of me\n    img = loadImage(\"https:\/\/i.imgur.com\/wtr45Lt.jpg\");\n}\n\nfunction setup() {\n    createCanvas(450, 400);\n    background(0);\n    img.resize(width, height);\n    img.loadPixels();\n    \/\/fast frame rate\n    frameRate(500);\n}\n\nfunction draw() {\n\n    \/\/have random x & y for portrait\n    var x = floor(random(0, 450));\n    var y = floor(random(0, 400));\n    \/\/use color from pixel\n    var color = img.get(x, y);\n    \/\/smaller shapes leads to more detail\n    var s = random(3, 10);\n    \n    \/\/ #4 is used for each pixel\n    if (option == 1){\n        \/\/have shape pop as pixels\n        fill(color);\n        \/\/outline of light-colored stroke\n        stroke(\"lightyellow\");\n        strokeWeight(.5);\n        stroke(color);\n        textSize(s);\n        text(\"4\", x, y);\n\n    \/\/switch 4 to circle option w\/ mousePressed\n    } else if (option == 2){\n        \/\/have shape pop as pixels\n        fill(color);\n        \/\/outline of light-colored stroke\n        stroke(\"lightyellow\");\n        strokeWeight(.5);\n        circle(x, y, s);\n\n    \/\/switch circle to triangle option w\/ mousePressed\n    } else if (option == 3){\n        \/\/have shape pop as pixels\n        fill(color);\n        noStroke();\n        strokeWeight(.5);\n        triangle(x, y, x - s, y + s, x + s, y + s);\n    }\n    \n}\n\nfunction mousePressed(){\n    option++;\n    if(option &gt; 3){\n        option = 1;\n    }\n    background(0);\n}\n<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>This was pretty fun to think of different ways to create a portrait. Going off the pointillism idea, I tried to think of different shapes that could be used and experiment. I decided to use mousePressed() to restart with new shapes. I feel they all came out pretty interesting and all the shapes relate to &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/11\/03\/project-9-portrait\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 9 Portrait&#8221;<\/span><\/a><\/p>\n","protected":false},"author":737,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[111,57],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/75023"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/users\/737"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=75023"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/75023\/revisions"}],"predecessor-version":[{"id":75027,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/75023\/revisions\/75027"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=75023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=75023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=75023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}