{"id":71163,"date":"2022-09-19T09:33:34","date_gmt":"2022-09-19T13:33:34","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=71163"},"modified":"2022-09-19T09:33:34","modified_gmt":"2022-09-19T13:33:34","slug":"project-2-portrait-variables","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/19\/project-2-portrait-variables\/","title":{"rendered":"Project 2 &#8211; Portrait Variables"},"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 project, I chose to make very cartoonish but expression filled &ldquo;blumans&rdquo;. These little characters are portraits that change face shape, expression, and proportions based on the code below.<\/p>\n\n\n\n<div class=\"wp-block-file\"><a class=\"p5_sketch_link\" data-width=\"640\" data-height=\"480\" id=\"wp-block-file--media-f66660da-0b74-46fb-8ec3-92f46a115e5a\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/sketch-238.js\">csavitzv_02<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"640\" height=\"480\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">    \/\/Cole Savitz-Vogel\n    \/\/Section A\n\n    \/\/Variability includes, Face Hight and Width, Eye Size, Eye Seperation, Eyebrow Position, Pupil Proportions, Mouth Size, Mouth Position, Smile Ratio, Skin Tone \n\nvar eyeSize = 20;\nvar faceWidth = 100;\nvar faceHeight = 100;\nvar eyeWidth = .25\nvar mouthSize = 50;\nvar mouthDrop = 0;\nvar smile = 5;\nvar inBrow = 0;\nvar outBrow = 0;\nvar skinR = 200;\nvar skinG = 200;\nvar skinB = 250;\n\n \nfunction setup() {\n    createCanvas(640, 480);\n}\n \n\nfunction draw() {\n    background(255);\n    fill(skinR,skinG,skinB)\n    strokeWeight(0);\n    ellipse(width \/ 2, height \/ 2, faceWidth,  faceHeight);\n    fill(0);\n    var mouth = width \/ 2 + faceWidth;\n    arc(width \/ 2, (height \/ 2)+mouthDrop, mouthSize, mouthSize, 0, PI, OPEN);\n    fill(skinR,skinG,skinB)\n    arc(width \/ 2, (height \/ 2) + mouthDrop - 1, mouthSize - 1, mouthSize - smile, 0, PI, OPEN);\n    var eyeLX = width \/ 2 - faceWidth * eyeWidth;\n    var eyeRX = width \/ 2 + faceWidth * eyeWidth;\n    fill(250);\n    ellipse(eyeLX, height \/ 2, eyeSize + 4);\n    ellipse(eyeRX, height \/ 2, eyeSize + 4);\n    fill(0);\n    ellipse(eyeLX, height \/ 2, eyeSize - 2);\n    ellipse(eyeRX, height \/ 2, eyeSize - 2);\n    strokeWeight(10);\n    line(eyeLX - inBrow, (height \/ 2) - 20, eyeLX + 20,(height \/ 2)- outBrow);\n    line(eyeRX + inBrow, (height \/ 2) - 20, eyeRX - 20,(height \/ 2)- outBrow);\n}\n \nfunction mousePressed() {\n    faceWidth = random(100, 150);\n    faceHeight = random(100, 160);\n    eyeSize = random(10, 30);\n    eyeWidth = random(.2,.6);\n    mouthSize = random(30,70);\n    mouthDrop = random(0,40);\n    smile = random(.1,50);\n    inBrow = random(10,25);\n    outBrow = random(10,25);\n    skinR = random(100, 200);\n    skinG = random(100, 200);\n    skinB = random(200, 250);\n    \n}<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>For my project, I chose to make very cartoonish but expression filled &ldquo;blumans&rdquo;. These little characters are portraits that change face shape, expression, and proportions based on the code below. csavitzv_02 \/\/Cole Savitz-Vogel \/\/Section A \/\/Variability includes, Face Hight and Width, Eye Size, Eye Seperation, Eyebrow Position, Pupil Proportions, Mouth Size, Mouth Position, Smile Ratio, &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/19\/project-2-portrait-variables\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 2 &#8211; Portrait Variables&#8221;<\/span><\/a><\/p>\n","protected":false},"author":757,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[97,55],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/71163"}],"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\/757"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=71163"}],"version-history":[{"count":4,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/71163\/revisions"}],"predecessor-version":[{"id":72457,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/71163\/revisions\/72457"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=71163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=71163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=71163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}