{"id":75045,"date":"2022-11-04T19:23:31","date_gmt":"2022-11-04T23:23:31","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=75045"},"modified":"2022-11-04T19:49:57","modified_gmt":"2022-11-04T23:49:57","slug":"srishtys-project-9-portrait","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/11\/04\/srishtys-project-9-portrait\/","title":{"rendered":"Srishty&#8217;s 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><p>For my portrait, I decided to do something similar to pointillism but instead of dots, I used words. I made a list of words that are about my passions\/ideal career choices and then loaded a word randomly from the list to take place of each pixel in my image. Each word matches the color of the pixel in its respective x and y location. The words are all a pretty small font so they can pick up the details of the pixels well. <\/p>\n\n\n\n<p><a class=\"p5_sketch_link\" data-width=\"480\" data-height=\"480\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/sketch-1.js\">sketch<\/a>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-04-at-7.42.00-PM.png\" alt=\"\" class=\"wp-image-75053\" width=\"482\" height=\"482\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-04-at-7.42.00-PM.png 482w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-04-at-7.42.00-PM-300x300.png 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-04-at-7.42.00-PM-150x150.png 150w\" sizes=\"(max-width: 482px) 85vw, 482px\"><figcaption>Screenshot of image 10 minutes in<\/figcaption><\/figure><figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-04-at-6.54.32-PM.png\" alt=\"\" class=\"wp-image-75050\" width=\"368\" height=\"368\"><figcaption>Image 5 minutes in<\/figcaption><\/figure><figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-04-at-6.52.18-PM.png\" alt=\"\" class=\"wp-image-75049\" width=\"368\" height=\"368\"><figcaption>Image about 30 seconds in <\/figcaption><\/figure><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\">\/\/ SRISHTY BHAVSAR\n\/\/ PROJECT 9\n\/\/ SECTION C 15-104\n\/*\nlet img;\nlet smallPoint, largePoint;\n\nfunction preload() {\n  img = loadImage('nameofimage');\n}\n\n*\/\n\n\nvar srishty;\nvar passions;\n\nfunction preload() {\n    srishty = loadImage(\"https:\/\/i.imgur.com\/kczcnA1.jpg\"); \/\/ image of me, srishty\n    passions = [\"designer\", \"artist\", \"UI\",\"UX\", \"researcher\", \"HCI\", \"architecture\", \n    \"color\", \"painting\", 'music', \"running\", \"singing\"]; \/\/ list of my passions and career interests\n    print(passions);\n\n}\n\nfunction setup() {\n    createCanvas(480,480);\n    srishty.resize(480,480); \/\/ resizes the ima2ge upload to imgur to be 480 by 480\n    background('white');\n    imageMode(CENTER); \/\/ centers image\n    srishty.loadPixels();\n    \/\/noLoop();\n\n}\n\n\nfunction draw() {\n    var x = floor(random(srishty.width));\n    var y = floor(random(srishty.height));\n    var c = srishty.get(x,y); \/\/ identifies the color of each pixels\n    fill(c,255);\n    textSize(8);\n    textFont('Helvetica')\n    text(passions[Math.floor((Math.random() * passions.length))] , x, y); \/\/ takes a random word from the list of passions and places it to be in the position of the image pixel\n}<\/code><\/pre><\/p><p><\/p>\n\n\n\n<p><\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>For my portrait, I decided to do something similar to pointillism but instead of dots, I used words. I made a list of words that are about my passions\/ideal career choices and then loaded a word randomly from the list to take place of each pixel in my image. Each word matches the color of &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/11\/04\/srishtys-project-9-portrait\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Srishty&#8217;s Project 9 Portrait&#8221;<\/span><\/a><\/p>\n","protected":false},"author":704,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[111,57,1],"tags":[93,130,61],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/75045"}],"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\/704"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=75045"}],"version-history":[{"count":2,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/75045\/revisions"}],"predecessor-version":[{"id":75054,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/75045\/revisions\/75054"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=75045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=75045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=75045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}