{"id":67444,"date":"2021-10-10T22:37:04","date_gmt":"2021-10-11T02:37:04","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/?p=67444"},"modified":"2021-10-10T22:40:34","modified_gmt":"2021-10-11T02:40:34","slug":"project-6-clock","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/10\/10\/project-6-clock\/","title":{"rendered":"Project 6: Clock"},"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><a class=\"p5_sketch_link\" data-width=\"350\" data-height=\"350\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/sketch-65.js\">sketch<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"350\" height=\"350\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">function setup() {\n    createCanvas(350, 350);\n}\n\nfunction draw() {\n    background(225, 213, 197);\n    var s = second();\n    var h = hour();\n    var m = minute();\n    mini(m); \/\/blue circles (minute)\n    horse(h); \/\/ black rectangle (hour)\n    circ(s); \/\/ yellow circle (seconds)\n}\n\n\/\/yellow circle grows according to seconds and red rectangle gets longer\nfunction circ(s) {\n    noStroke();\n    fill(\"orange\")\n    ellipse(175, 175, s * 3, s * 3);\n    fill(209, 54, 48)\n    rect(50, 0, 30, s * 6)\n    \/\/rect(300, 0, 30, s * 6)\n}\n\n\/\/blue circles grow according to the minute\nfunction mini(m) {\n    noStroke();\n    fill(37, 105, 193)\n    ellipse(0, 175, m * 6, m * 6)\n    ellipse(350, 175, m * 6, m * 6)\n    \/\/triangle(0, 350, m * 5, m * 5, 0, 0)\n}\n\n\/\/hour is represented by black rectangle, width and height grow every hour\nfunction horse(h) {\n    noStroke();\n    rectMode(CENTER);\n    fill(\"black\")\n    rect(175, 80, h * 5, h * 5)\n}<\/code><\/pre><\/p>\n\n\n\n<p>This project was a doozy. I decided to make it in the style of Bauhaus because to me that it was abstract design encompasses. With this design that I made, the circle in the middle and the reed line correspond to the seconds, the square in the center corresponds to the hour, and the blue circles represent the minutes.<\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>sketch function setup() { createCanvas(350, 350); } function draw() { background(225, 213, 197); var s = second(); var h = hour(); var m = minute(); mini(m); \/\/blue circles (minute) horse(h); \/\/ black rectangle (hour) circ(s); \/\/ yellow circle (seconds) } \/\/yellow circle grows according to seconds and red rectangle gets longer function circ(s) { noStroke(); &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/10\/10\/project-6-clock\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 6: Clock&#8221;<\/span><\/a><\/p>\n","protected":false},"author":653,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[106,58],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/67444"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/users\/653"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/comments?post=67444"}],"version-history":[{"count":5,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/67444\/revisions"}],"predecessor-version":[{"id":67453,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/67444\/revisions\/67453"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/media?parent=67444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/categories?post=67444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/tags?post=67444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}