{"id":73730,"date":"2022-10-02T23:02:10","date_gmt":"2022-10-03T03:02:10","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=73730"},"modified":"2022-10-02T23:02:10","modified_gmt":"2022-10-03T03:02:10","slug":"p-05-wallpaper","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/02\/p-05-wallpaper\/","title":{"rendered":"P-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>Took inspiration from a tile pattern for this project.<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-edf803bc-57d3-479e-8c5a-49417c70cdaa\" class=\"p5_sketch_link\" data-width=\"550\" data-height=\"380\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/10\/sketch-46.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=\"550\" height=\"380\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/ Bridget Doherty, bpdohert, 104 Section C\n\n\n\/\/ global color variables\nvar greyValue = 150;\nvar bckg = 240;\nvar lineCol = 0;\n\nfunction setup() {\n    createCanvas(550, 380);\n    background(bckg);\n}\n\nfunction draw() {\n    for (var i=50; i&lt;=height; i+=93) {\n        for (var j=50; j&lt;=width; j+=93){\n            clover(j, i);\n        }\n    }\n    for (var i=3; i&lt;=width+50; i+=93){\n        for (var j=3; j&lt;=height+50; j+=93){\n            innerCircle(i, j);\n        } \n    }\n    noLoop();\n}\n\nfunction clover(x, y){\n    var diam1 = 40;\n    var diam2 = 31;\n    var spacer = 26;\n\n    \/\/ clover outer grey section\n    strokeWeight(1);\n    stroke(lineCol);\n    fill(greyValue);\n    circle(x, y-spacer, diam1);\n    circle(x, y+spacer, diam1);\n    circle(x-spacer, y, diam1);\n    circle(x+spacer, y, diam1);\n\n    \/\/ clover inner white section\n    fill(bckg);\n    circle(x, y-spacer, diam2);\n    circle(x, y+spacer, diam2);\n    circle(x-spacer, y, diam2);\n    circle(x+spacer, y, diam2);\n    noStroke();\n    circle(x, y, 41);\n\n    \/\/ petals outline\n    stroke(lineCol);\n    strokeWeight(7);\n    line(x-15, y-7, x-7, y-15);\n    line(x+15, y-7, x+7, y-15);\n    line(x-15, y+7, x-7, y+15);\n    line(x+7, y+15, x+15, y+7);\n\n    \/\/ lines to complete the clover inner points\n    stroke(greyValue);\n    strokeWeight(8);\n    line(x-12, y-12, x-15, y-15);\n    line(x+12, y-12, x+15, y-15);\n    line(x-12, y+12, x-15, y+15);\n    line(x+12, y+12, x+15, y+15);\n\n    \/\/ circles outline\n    noStroke();\n    fill(lineCol);\n    circle(x-7, y-7, 12);\n    circle(x+7, y-7, 12);\n    circle(x-7, y+7, 12);\n    circle(x+7, y+7, 12);\n\n    \/\/ grey petals inside clover\n    stroke(greyValue);\n    strokeWeight(4);\n    line(x-15, y-7, x-7, y-15);\n    line(x+15, y-7, x+7, y-15);\n    line(x-15, y+7, x-7, y+15);\n    line(x+7, y+15, x+15, y+7);\n\n    strokeWeight(1);\n    fill(greyValue);\n    circle(x-7, y-7, 8);\n    circle(x+7, y-7, 8);\n    circle(x-7, y+7, 8);\n    circle(x+7, y+7, 8);\n    \n}\n\nfunction innerCircle(x,y){\n    var cross = 6;\n\n    \/\/ circles in between the clovers\n    strokeWeight(1);\n    stroke(lineCol);\n    fill(greyValue);\n    circle(x, y, 61);\n    fill(bckg);\n    circle(x, y, 50);\n\n    \/\/ plus sign in the middle of the circles\n    strokeWeight(7);\n    stroke(lineCol);\n    line(x+cross, y, x-cross, y);\n    line(x, y-cross, x, y+cross);\n    strokeWeight(4);\n    stroke(greyValue);\n    line(x+cross, y, x-cross, y);\n    line(x, y-cross, x, y+cross);\n}\n<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Took inspiration from a tile pattern for this project.<\/p>\n","protected":false},"author":715,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[88,61],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73730"}],"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\/715"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=73730"}],"version-history":[{"count":2,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73730\/revisions"}],"predecessor-version":[{"id":73735,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73730\/revisions\/73735"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=73730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=73730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=73730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}