{"id":66936,"date":"2021-10-02T23:01:03","date_gmt":"2021-10-03T03:01:03","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/?p=66936"},"modified":"2021-10-02T23:01:03","modified_gmt":"2021-10-03T03:01:03","slug":"project-05-wallpaper-7","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/10\/02\/project-05-wallpaper-7\/","title":{"rendered":"Project 05 Wallpaper"},"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=\"600\" data-height=\"600\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/sketch-16.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=\"600\" height=\"600\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/Tim Nelson-Pyne\n\/\/tnelsonp@andrew.cmu.edu\n\/\/Section C\n\/\/Project-05-Wallpaper\n\n\n\/\/controls the spacing of the pattern\nvar cellSize;\n\/\/controls the width of the eyes\nvar eyeWidth;\n\/\/controls the height of the eyes\nvar eyeHeight;\n\/\/controls the x position of the patten elements\nvar x;\n\/\/controls the y position of the pattern elements\nvar y;\n\nfunction setup() {\n    createCanvas(600, 600);\n    background(255);\n    cellSize = width \/ 4\n}\n\n\n\/\/tileA draws everything to do with the eyes\n\nfunction tileA(x, y, cellSize) {\n\n    eyeHeight = cellSize \/ 7;\n    eyeWidth = cellSize \/ 4;\n\n    \/\/clown makeup\n    \n    stroke(248, 24, 148);\n    fill(255, 204, 239);\n    strokeWeight(4);\n    bezier(x + eyeWidth \/ 4, y + eyeHeight + 5, x, y + eyeHeight + 5, x, y + eyeHeight + 5, x, y + cellSize \/ 2 - 10);\n    bezier(x - eyeWidth \/ 4, y + eyeHeight + 5, x, y + eyeHeight + 5, x, y + eyeHeight + 5, x, y + cellSize \/ 2 - 10);\n    bezier(x + eyeWidth \/ 4, y - eyeHeight - 5, x, y - eyeHeight - 5, x, y - eyeHeight - 5, x, y - cellSize \/ 2 + 10);\n    bezier(x - eyeWidth \/ 4, y - eyeHeight - 5, x, y - eyeHeight - 5, x, y - eyeHeight - 5, x, y - cellSize \/ 2 + 10);\n    \/\/eye shadow\n    for (i = 0; i &lt; 20; i += 1) {\n        noFill();\n        strokeWeight(.5);\n        stroke(248, map(i, 0, 20, 24, 255), map(i, 0, 20, 148, 255));\n        ellipse(x, y, eyeWidth + i, eyeHeight + i);\n    }\n\n    \/\/ eye\n    fill(255);\n    strokeWeight(3);\n    stroke(245, 230, 0);\n    ellipse(x, y, eyeWidth, eyeHeight);\n    fill(0, 0, 255);\n    ellipse(x, y, 20, eyeHeight);\n    fill(255);\n    noStroke();\n    arc(x, y, 20, eyeHeight, radians(220), radians(250))\n\n}\n\n\/\/tileB draws the mouth\nfunction tileB(x, y, cellSize) {\n    noFill();\n    strokeWeight(5);\n    stroke(248, 24, 148);\n    arc(x, y, cellSize \/ 3, cellSize \/ 10 + 10, radians(0), radians(180));\n    arc(x, y, cellSize \/ 3, cellSize \/ 10, radians(0), radians(180));\n}\n\n\/\/tileC draws the nose\nfunction tileC(x, y, cellSize) {\n    fill(248, 24, 148);\n    noStroke();\n    ellipse(x, y - cellSize \/ 4, cellSize \/ 4, cellSize \/ 4);\n    fill(255, 204, 239);\n    ellipse(x, y - cellSize \/ 4, cellSize \/ 5, cellSize \/ 5);\n}\n\nfunction draw() {\n    for (x = cellSize \/ 2; x &lt; width; x += cellSize){\n        for (y = cellSize \/ 2; y &lt; height; y += cellSize){\n            tileA(x, y, cellSize);\n        }\n    }\n    for (x = cellSize; x &lt; width; x += cellSize){\n        for (y = cellSize; y &lt; height; y += cellSize){\n            tileB(x, y, cellSize);\n            tileC(x, y, cellSize);\n\n        }\n    }\n    noLoop();\n\n}<\/code><\/pre><\/p>\n\n\n\n<p>I made a clown face wallpaper. The walls have eyes, and they&rsquo;re clowning you.<\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>sketch \/\/Tim Nelson-Pyne \/\/tnelsonp@andrew.cmu.edu \/\/Section C \/\/Project-05-Wallpaper \/\/controls the spacing of the pattern var cellSize; \/\/controls the width of the eyes var eyeWidth; \/\/controls the height of the eyes var eyeHeight; \/\/controls the x position of the patten elements var x; \/\/controls the y position of the pattern elements var y; function setup() { createCanvas(600, &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/10\/02\/project-05-wallpaper-7\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 05 Wallpaper&#8221;<\/span><\/a><\/p>\n","protected":false},"author":662,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[104,57],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66936"}],"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\/662"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/comments?post=66936"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66936\/revisions"}],"predecessor-version":[{"id":66939,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66936\/revisions\/66939"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/media?parent=66936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/categories?post=66936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/tags?post=66936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}