{"id":73887,"date":"2022-10-08T15:11:11","date_gmt":"2022-10-08T19:11:11","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=73887"},"modified":"2022-10-08T15:11:11","modified_gmt":"2022-10-08T19:11:11","slug":"project-06-3","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/08\/project-06-3\/","title":{"rendered":"Project-06"},"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>This is my abstract clock:<\/p>\n\n\n\n<p>In the sunflower I draw, I use its stem to represent the hour, that as time goes, the sunflower will gradually be taller; I use the petal of the flower to represent the minute; I use the color change of the leaf and the text to represent the second.<\/p>\n<div><a class=\"p5_sketch_link\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/10\/sketch-63.js\" data-width=\"300\" data-height=\"400\">sketch<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"300\" height=\"400\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\nfunction setup() {\n    createCanvas(300, 400);\n    background(255);\n}\n\n\n\nfunction draw() {\n\n    noStroke();\n    background(242, 226, 204);\n\n    \/\/background leaf -- represent second\n    if (second()%2 == 0) {\n        fill(123, 142, 31);\n    } else {\n        fill(230, 143, 89)\n    }\n\n    push();\n    translate(140, 200);\n    rotate(radians(30))\n    ellipse(-10, 0, 50, 15);\n    rotate(radians(-60));\n    ellipse(10, 30, 40, 10);\n    pop();\n    \n    \/\/base-flowerpot\n    var pX = 150;\n    var pY = 250\n    var pHeight = 8;\n    \n    fill(187, 160, 133);\n    beginShape();\n    vertex(pX-50, pY);\n    vertex(pX-60, pY+pHeight);\n    vertex(pX-50, pY+2*pHeight);\n    vertex(pX+50, pY+2*pHeight);\n    vertex(pX+60, pY+pHeight);\n    vertex(pX+50, pY)\n    endShape();\n\n    fill(170,119, 98)\n    beginShape();\n    vertex(pX-50, pY+2*pHeight);\n    vertex(pX-30, pY+10*pHeight);\n    vertex(pX+30, pY+10*pHeight);\n    vertex(pX+50, pY+2*pHeight);\n    endShape();\n\n\n    \/\/flower stem -- represents hour\n    var sWidth = 10\n    var sHeight= 50\n    sHeight += hour();\n    fill(123, 142, 31)\n    beginShape();\n    curveVertex(pX-sWidth, pY);\n    curveVertex(pX-sWidth, pY);\n    curveVertex(pX-sWidth\/2, pY-sHeight);\n    curveVertex(pX-sWidth*2, pY-2*sHeight);\n    curveVertex(pX-sWidth, pY-2*sHeight);\n    curveVertex(pX+sWidth\/2, pY-sHeight);\n    curveVertex(pX, pY);\n    curveVertex(pX, pY);\n    endShape();\n\n    \/\/sunflower petal -- represent minute\n    push();\n    translate(pX-sWidth, pY-2*sHeight);\n    noStroke();\n    for (var i=0; i&lt;minute(); i++) {\n        rotate(radians(6));\n        fill(252, 171, 1);\n        ellipse(0, 20, 5, 65);\n        fill(228, 121, 1);\n        ellipse(0, 20, 3, 35);\n    }\n\n    \/\/seeds\n    fill(41, 5, 2);\n    circle(0, 0, 60);\n    fill(37, 22, 1);\n    circle(0, 0, 30);\n    fill(34, 28, 0);\n    circle(0, 0, 20);\n    pop();\n    \n    \/\/Text -- represent second\n    if (second() %2 == 0) {\n        textSize(25);\n        fill(254, 203, 1, 220);\n        text('Have A Good Day!', 40, 40);\n    } \n   \n}\n\n\n<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>This is my abstract clock: In the sunflower I draw, I use its stem to represent the hour, that as time goes, the sunflower will gradually be taller; I use the petal of the flower to represent the minute; I use the color change of the leaf and the text to represent the second. sketch &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/08\/project-06-3\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project-06&#8221;<\/span><\/a><\/p>\n","protected":false},"author":777,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[106,55],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73887"}],"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\/777"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=73887"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73887\/revisions"}],"predecessor-version":[{"id":73888,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73887\/revisions\/73888"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=73887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=73887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=73887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}