{"id":65507,"date":"2021-09-11T16:46:16","date_gmt":"2021-09-11T20:46:16","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/?p=65507"},"modified":"2021-09-11T16:46:16","modified_gmt":"2021-09-11T20:46:16","slug":"project-02-variable-face-3","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/09\/11\/project-02-variable-face-3\/","title":{"rendered":"Project-02-Variable-Face"},"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\"><a class=\"p5_sketch_link\" data-width=\"480\" data-height=\"600\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/09\/Variable-Face.js\">Variable-Face<\/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=\"600\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">var eyeSpacing = 80;\nvar noseLength = 120;\nvar mouthWidth = 120;\nvar mouthHeight = 100;\n\nfunction setup() {\n    createCanvas(480,640);\n    background(200);\n}\n\nfunction draw() {\n    \/\/head\n    fill(255,255,255);\n    ellipse(240,320,360,440);\n    \/\/eyes\n    fill(0,0,0);\n    ellipse(240+eyeSpacing, 300, 50, 80);\n    ellipse(240-eyeSpacing, 300, 50, 80);\n    \/\/nose\n    fill(255);\n    triangle(240, 300, 200, 300+noseLength, 280, 300+noseLength);\n    \/\/mouth\n    arc(240, 400, mouthWidth, mouthHeight, 0, PI, CHORD)\n\n    \/\/check for user input\n    if(mouseIsPressed) {\n      eyeSpacing = random(50,100);\n      noseLength = random(40,80);\n      mouthWidth = random(120,240);\n      mouthHeight = random(100,200);\n    }\n}\n<\/code><\/pre><\/div>\n\n\n\n<p>Phew I think I uploaded this correctly! Honestly the hardest part of the assignment was figuring out how to do the HTML stuff. Although very simple, I like my final product since it&rsquo;s always smiling at me \ud83d\ude00<\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Phew I think I uploaded this correctly! Honestly the hardest part of the assignment was figuring out how to do the HTML stuff. Although very simple, I like my final product since it&rsquo;s always smiling at me \ud83d\ude00<\/p>\n","protected":false},"author":652,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[97,56],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/65507"}],"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\/652"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/comments?post=65507"}],"version-history":[{"count":3,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/65507\/revisions"}],"predecessor-version":[{"id":65526,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/65507\/revisions\/65526"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/media?parent=65507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/categories?post=65507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/tags?post=65507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}