{"id":70299,"date":"2022-09-06T23:49:56","date_gmt":"2022-09-07T03:49:56","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=70299"},"modified":"2022-09-06T23:49:56","modified_gmt":"2022-09-07T03:49:56","slug":"project-01-portrait","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/06\/project-01-portrait\/","title":{"rendered":"Project 01: 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><\/p>\n\n\n\n<div><a class=\"p5_sketch_link\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/sketch-75.js\" data-width=\"500\" data-height=\"300\">sketch<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"500\" height=\"300\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/ Emily Franco\n\/\/ Section C\n\/\/Graphic elements used: ellipse,cicle,line,point,rect,square,tri,arc\nvar y_ref_pos = 150;\nvar x=0;\nfunction setup() {\n    createCanvas(500, 300);\n    background(220);\n    text(\"p5.js vers 0.9.0 test.\", 10, 15);\n}\n\nfunction draw() {\n\t\/\/background\n\tstrokeWeight(0);\n\tfill(random(100,200),random (100,200),random(100,200));\n\trect(x,0,10,height);\n\tfill(217,245,228);\n\trect(x+10,0,30,height);\n\tx=x+30;\n\t\/\/--------HAIR-------\n\t\/\/back hair\n\tfill (104, 66, 17); \/\/dark brown\n\tellipse (width\/2, y_ref_pos+28,130,200);\n\n\t\/\/--------CLOTHES-------\n\tfill (220, 96, 46); \/\/orange\n\tarc((width\/2)-16+22,y_ref_pos+79,140,35,Math.PI,0);\n\t\/\/shirt \n\trect((width\/2)-43.5,y_ref_pos+70,90.5,90);\n\n\t\/\/------FACE-----\n\tstrokeWeight (.25);\n\t\/\/base ears \n\tfill (238, 217, 197); \/\/beige\n\tellipse ((width\/2)-53,y_ref_pos,16,30);\n\tellipse ((width\/2)+53,y_ref_pos,16,30);\n\t\/\/neck \n\tfill (238, 217, 197);\/\/beige\n\tellipse((width\/2)-22+22.5, y_ref_pos+45+20,45,30);\n\tstrokeWeight (0);\n\trect((width\/2)-22, y_ref_pos+45,45,20);\n\t\/\/base face\n\tstrokeWeight (.25);\n\tellipse (width\/2,y_ref_pos,100,116);\n\t\/\/nose \n\tfill (229, 155, 99); \/\/orange\n\ttriangle (width\/2,y_ref_pos-10,240,y_ref_pos+15,250,y_ref_pos+18);\n\t\/\/eyes \n\tfill (58,37,22); \/\/dark brown\n\tellipse ((width\/2)-22,y_ref_pos-10,8,12);\n\tellipse ((width\/2)+22,y_ref_pos-10,8,12);\n\t\/\/eyebrows \n\tstroke(58,37,22);\n\tstrokeWeight (.75);\n\tnoFill();\n\tarc((width\/2)-22,y_ref_pos-17,10,7,-3,-0.5);\n\tarc((width\/2)+22,y_ref_pos-17,10,7,-2.5,0);\n\t\/\/smile\n\tarc(width\/2,y_ref_pos+33,10,7,0,3);\n\t\/\/cheeks\n\tfill (233, 161, 135); \/\/pink\n\tstrokeWeight (0);\n\tcircle((width\/2)+22,y_ref_pos+15,20);\n\tcircle((width\/2)-25,y_ref_pos+15,20);\n\n\t\/\/------BODY-----\n\t\/\/shoulders\n\tfill (238, 217, 197); \/\/beige\n\tcircle((width\/2)-60, y_ref_pos+90,40);\n\tcircle((width\/2)+63, y_ref_pos+90,40);\n\t\/\/arms\n\trect((width\/2)-80,y_ref_pos+90,40,70);\n\trect((width\/2)+43,y_ref_pos+90,40,70);\n\n\t\/\/-----DETAILS----\n\t\/\/earings\n\tfill (111, 115, 210); \/\/purple\n\tsquare ((width\/2)-57,y_ref_pos+15,8); \n\tsquare ((width\/2)+50,y_ref_pos+15,8);\n\t\/\/bangs\n\tpush();\n\tstrokeWeight(0);\n\tfill (104, 66, 17); \/\/brown \n\trotate (-0.9);\n\tellipse (width\/2-165, y_ref_pos+135,20,75);\n\trotate (1.7);\n\tellipse (width\/2-14, y_ref_pos-238,20,75);\n\tpop();\n\t\/\/hairclip \n\t\/\/random color generated in first loop and only changes when page is reloaded\n\tif (x==30) {\n\t\tstroke(r=random(100,200),g=random (100,200),b=random(100,200));\n\t}else{\n\t\tstroke(r,g,b);\n\t}\n\tstrokeWeight(4);\n\tline(width\/2+25,y_ref_pos-30,(width\/2)+40,y_ref_pos-40);\n\t\/\/shirt details\n\tstroke(172,146,166);\n\tpoint(width\/2, y_ref_pos+120);\n\tpoint(width\/2, y_ref_pos+100);\n\tpoint(width\/2, y_ref_pos+140);\n\n\t\/\/reset stroke attribute\n\tstrokeWeight(0);\n\n}\n<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>sketch \/\/ Emily Franco \/\/ Section C \/\/Graphic elements used: ellipse,cicle,line,point,rect,square,tri,arc var y_ref_pos = 150; var x=0; function setup() { createCanvas(500, 300); background(220); text(&#8220;p5.js vers 0.9.0 test.&#8221;, 10, 15); } function draw() { \/\/background strokeWeight(0); fill(random(100,200),random (100,200),random(100,200)); rect(x,0,10,height); fill(217,245,228); rect(x+10,0,30,height); x=x+30; \/\/&#8212;&#8212;&#8211;HAIR&#8212;&#8212;- \/\/back hair fill (104, 66, 17); \/\/dark brown ellipse (width\/2, y_ref_pos+28,130,200); \/\/&#8212;&#8212;&#8211;CLOTHES&#8212;&#8212;- fill &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/06\/project-01-portrait\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 01: Portrait&#8221;<\/span><\/a><\/p>\n","protected":false},"author":719,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,57,1],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/70299"}],"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\/719"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=70299"}],"version-history":[{"count":5,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/70299\/revisions"}],"predecessor-version":[{"id":71584,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/70299\/revisions\/71584"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=70299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=70299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=70299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}