{"id":69815,"date":"2022-09-06T12:16:09","date_gmt":"2022-09-06T16:16:09","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=69815"},"modified":"2022-09-06T12:21:12","modified_gmt":"2022-09-06T16:21:12","slug":"project-1-my-self-portrait","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/06\/project-1-my-self-portrait\/","title":{"rendered":"Project 1: My self-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><div class=\"wp-block-file\"><a id=\"wp-block-file--media-a3df33a0-f744-4b84-a1ba-d016685bbdd2\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/sketch-7.js\">sketch<\/a><\/div>\n\n\n<div><a class=\"p5_sketch_link\" data-width=\"500\" data-height=\"400\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/sketch-7.js\">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=\"400\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">function setup(){\n    createCanvas(500,300);\n    background(221,236,240);\n}\n\nfunction draw(){\n    noStroke();\n    fill(125,158,166);\n    ellipse(40,60,180,90);\n    ellipse(450,200,180,90);\n    stroke(23,20,49);\n    strokeWeight(20);\n    line(0,200,500,100);\n    line(0,150,500,200);\n    noStroke();\n    fill(208,187,164);\n    rect(230,180,40,40);\/\/rectangle of the neck\n    fill(131,142,189);\n    triangle(100,240,230,200,270,240);\n    triangle(400,240,270,200,230,240);\n    rect(100,240,300,60);\n    fill(235,210,173);\n    ellipse(250,110,120,160);\/\/head ellipse\n    fill(210,152,138);\n    beginShape();\n    vertex(235,168);\n    vertex(245,162);\n    vertex(250,165);\n    vertex(255,162);\n    vertex(265,168);\n    vertex(255,175);\n    vertex(245,175);\n    endShape();\n    fill(113,96,79);\n    beginShape();\n    vertex(185,80);\n    vertex(180,120);\n    vertex(200,100);\n    vertex(210,110);\n    vertex(220,95);\n    vertex(240,110);\n    vertex(260,100);\n    vertex(280,125);\n    vertex(290,100);\n    vertex(295,115);\n    vertex(305,100);\n    vertex(320,120);\n    vertex(310,80);\n    endShape();\/\/hair\n    fill(50);\n    ellipse(250,70,200,40);\n    fill(20);\n    ellipse(250,60,120,20);\n    rect(190,10,120,50);\n    ellipse(250,10,120,20);\n    fill(190);\n    rect(180,110,140,35);\n    fill(147,141,140);\n    beginShape();\n    vertex(300,110);\n    vertex(305,110);\n    vertex(298,145);\n    vertex(290,145);\n    endShape();\n    beginShape();\n    vertex(310,110);\n    vertex(312,110);\n    vertex(310,145);\n    vertex(305,145);\n    endShape();\n    fill(255);\n    beginShape();\n    vertex(316,110);\n    vertex(318,110);\n    vertex(315,145);\n    vertex(312,145);\n    endShape();\n    beginShape();\n    vertex(185,110);\n    vertex(190,110);\n    vertex(187,145);\n    vertex(183,145);\n    endShape();\n    stroke(0);\n    strokeWeight(4);\n    line(230,120,230,135); \n    line(270,120,270,135);\n    noStroke();\n    fill(235,210,173);\n    triangle(250,140,240,145,260,145);   \n    fill(220,227,146);\n    ellipse(140,270,30);\n    ellipse(290,260,20);\n    fill(190,145,192);\n    ellipse(220,250,20);\n    fill(225,168,39);\n    ellipse(350,280,30);\n    fill(148,209,205);\n    ellipse(300,220,15);\n\n\n\n}\n   \n\n<\/code><\/pre><\/div>\n\n\n<p>I found that creating an irregular shape is very challenging, and also I need to calculate a lot of the positions and locations.<\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>sketch function setup(){ createCanvas(500,300); background(221,236,240); } function draw(){ noStroke(); fill(125,158,166); ellipse(40,60,180,90); ellipse(450,200,180,90); stroke(23,20,49); strokeWeight(20); line(0,200,500,100); line(0,150,500,200); noStroke(); fill(208,187,164); rect(230,180,40,40);\/\/rectangle of the neck fill(131,142,189); triangle(100,240,230,200,270,240); triangle(400,240,270,200,230,240); rect(100,240,300,60); fill(235,210,173); ellipse(250,110,120,160);\/\/head ellipse fill(210,152,138); beginShape(); vertex(235,168); vertex(245,162); vertex(250,165); vertex(255,162); vertex(265,168); vertex(255,175); vertex(245,175); endShape(); fill(113,96,79); beginShape(); vertex(185,80); vertex(180,120); vertex(200,100); vertex(210,110); vertex(220,95); vertex(240,110); vertex(260,100); vertex(280,125); vertex(290,100); vertex(295,115); vertex(305,100); vertex(320,120); vertex(310,80); endShape();\/\/hair &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/06\/project-1-my-self-portrait\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 1: My self-portrait&#8221;<\/span><\/a><\/p>\n","protected":false},"author":770,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,121,1],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/69815"}],"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\/770"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=69815"}],"version-history":[{"count":3,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/69815\/revisions"}],"predecessor-version":[{"id":69879,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/69815\/revisions\/69879"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=69815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=69815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=69815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}