{"id":70723,"date":"2022-09-09T13:51:19","date_gmt":"2022-09-09T17:51:19","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=70723"},"modified":"2022-09-09T13:58:14","modified_gmt":"2022-09-09T17:58:14","slug":"__trashed-162","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/09\/__trashed-162\/","title":{"rendered":"Project 02: Variable Faces, Faces Vara"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><body><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\/09\/image-3.png\" alt=\"\" class=\"wp-image-70726\" width=\"267\" height=\"247\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/image-3.png 711w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/image-3-300x278.png 300w\" sizes=\"(max-width: 267px) 85vw, 267px\"><\/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\/09\/image-6.png\" alt=\"\" class=\"wp-image-70729\" width=\"270\" height=\"256\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/image-6.png 688w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/image-6-300x286.png 300w\" sizes=\"(max-width: 270px) 85vw, 270px\"><\/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\/09\/image-5.png\" alt=\"\" class=\"wp-image-70728\" width=\"269\" height=\"234\"><\/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\/09\/image-8.png\" alt=\"\" class=\"wp-image-70731\" width=\"266\" height=\"299\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/image-8.png 558w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/image-8-268x300.png 268w\" sizes=\"(max-width: 266px) 85vw, 266px\"><\/figure><p>\/\/Alexia Forsyth<br>\/\/ Section A<\/p>\n\n\n\n<p>\/\/base colors<br>var r = 255;<br>var g = 231;<br>var b = 125;<\/p>\n\n\n\n<p>\/\/<br>faceWidth = 180;<br>faceHeight = 250;<br>hairWidth = 300;<br>hairHeight = 320;<br>lipWidth = 55;<br>lipHeight = 35;<br>eyebrowWidth = 40;<br>eyebrowHeight = 5;<\/p>\n\n\n\n<p>function setup() {<br>createCanvas(640, 480);<br>text(&ldquo;p5.js vers 0.9.0 test.&rdquo;, 10, 15);<br>}<\/p>\n\n\n\n<p>function draw() {<br>\/\/face #1<br>background(r ,g, b);<br>strokeWeight(1);<br>\/\/hair<br>fill(r-255,g-231,b-125);<br>ellipse(width\/2, 260, hairWidth, hairHeight);<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    \/\/neck\n    fill(r-156, g-156, b-112);\n    rect(205,400, 220,90);\n    rect(290, 320, 60, 100);\n\n    \/\/face\n    ellipse(width\/2, height\/2, faceWidth, faceHeight);\n    circle(420,240,1);\n\n    \/\/nose\n    ellipse(310, 290, 20,11);\n    ellipse(330, 290, 20,11);\n    rect(width\/2-7,height\/2-15,15,65);\n    fill(0);\n    ellipse(310,290,11,4);\n    fill(0);\n    ellipse(330,290,11,4);\n\n    \/\/ears\n    fill(r-156, g-156, b-112);\n    ellipse(410,230,30,45);\n    fill(r, g+24, b+130);\n    circle(410,250, 10,10); \/\/earrings \n\n    fill(r-156, g-156, b-112);\n    ellipse(225,230,30,45);\n    fill(r, g+24, b+130);\n    circle(225,250, 10,10); \/\/earrings\n\n    \/\/eyes\n    fill(255);\n    ellipse(width\/2 +40 ,215,faceWidth*.222,faceHeight*.12);\n    fill(r-207, g-132, b-112);\n    circle(width\/2 +40,215,faceWidth*.139);\n    fill(0);\n    circle(width\/2 +40,215,faceWidth*.1);\n    stroke(0);\n\n    fill(255);\n    ellipse(width\/2 -40,215,faceWidth*.222,faceHeight*.12);\n    fill(r-207, g-132, b-112);\n    circle(width\/2 -40,215,faceWidth*.139);\n    fill(0);\n    circle(width\/2 -40,215,faceWidth*.1);\n    stroke(0);\n\n\n    \/\/eyebrows\n    fill(r-255,g-231,b-125);\n    rect(width\/2 +20,190,eyebrowWidth,eyebrowHeight);\n    rect(width\/2 -60,190,eyebrowWidth,eyebrowHeight);\n\n    \/\/freckles\n    circle(335,250,2);\n    circle(380,250,2);\n    circle(320,240,2);\n    circle(360,245,2);\n    circle(280,240,2);\n    circle(310,230,2);\n    circle(290,250,2);\n    circle(270,250,2);\n    circle(340,230,2);\n\n    \/\/lips\n    fill(r-209, g-199, b-109);\n    ellipse(width\/2,320,lipWidth,lipHeight);\n    strokeWeight(5);\n    line(width\/2 -(lipWidth-25), 320, width\/2 + (lipWidth - 25), 320);<\/code><\/pre>\n\n\n\n<p>}<\/p>\n\n\n\n<p>function mousePressed(){<br>faceWidth = random(100,250);<br>faceHeight = random(200,290);<br>hairWidth = faceWidth + 120;<br>hairHeight = faceHeight + 70;<br>lipWidth = random(30,70);<br>lipHeight = random(20,50);<br>eyebrowWidth = random(35,45);<br>eyebrowHeight = random(.5, 10);<br>r = random(150,400);<br>g = random(150,400);<br>b = random(100,400);<br>}<\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>\/\/Alexia Forsyth\/\/ Section A \/\/base colorsvar r = 255;var g = 231;var b = 125; \/\/faceWidth = 180;faceHeight = 250;hairWidth = 300;hairHeight = 320;lipWidth = 55;lipHeight = 35;eyebrowWidth = 40;eyebrowHeight = 5; function setup() {createCanvas(640, 480);text(&ldquo;p5.js vers 0.9.0 test.&rdquo;, 10, 15);} function draw() {\/\/face #1background(r ,g, b);strokeWeight(1);\/\/hairfill(r-255,g-231,b-125);ellipse(width\/2, 260, hairWidth, hairHeight); } function mousePressed(){faceWidth = random(100,250);faceHeight &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/09\/__trashed-162\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 02: Variable Faces, Faces Vara&#8221;<\/span><\/a><\/p>\n","protected":false},"author":718,"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\/70723"}],"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\/718"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=70723"}],"version-history":[{"count":3,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/70723\/revisions"}],"predecessor-version":[{"id":70732,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/70723\/revisions\/70732"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=70723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=70723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=70723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}