{"id":73529,"date":"2022-10-01T19:58:14","date_gmt":"2022-10-01T23:58:14","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=73529"},"modified":"2022-10-01T19:58:14","modified_gmt":"2022-10-01T23:58:14","slug":"project-05-wallpaper-5","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/01\/project-05-wallpaper-5\/","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 wallpaper design inspired by Marimekko Unikko!<\/p>\n<div><a class=\"p5_sketch_link\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/10\/sketch-26.js\" data-width=\"600\" data-height=\"700\">sketch<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"600\" height=\"700\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/Angela Yang\n\/\/Section C\n\nfunction setup() {\n  createCanvas(600, 700);\n  noLoop();\n  \/\/frameRate(1);\n}\n\nfunction draw() {\n  background(\"#ddd9c8\");\n  scale(0.6);\n  for (let i = 0; i &lt; 7; i++) {\n    for (let j = 0; j &lt; 6; j++) {\n      switch (parseInt(random(3))) {\n        case 0:\n          mikkoflower1(190 * j, 215 * i, color(36, 28, 85));\n          break;\n        case 1:\n          mikkoflower2(190 * j, 215 * i, color(36, random(100), 85));\n          break;\n        case 2:\n          scale(1);\n          mikkoflower3(190 * j, 215 * i, color(36, random(100), 85));\n          break;\n      }\n    }\n  }\n\n  \/\/Flower 1\n  function mikkoflower1(x, y, fillcolor) {\n    push();\n\n    \/\/ petals\n    fill(\"#b8172a\");\n    translate(x, y);\n    noStroke();\n    for (let i = 0; i &lt; 20; i++) {\n      ellipse(15, 10, 90, 5);\n      \/\/ ellipse(0, 50, 30, 60);\n      ellipse(0, 0, 20, 90);\n      scale(1.02);\n      rotate(radians(60));\n    }\n\n    \/\/ center\n    fill(\"#ddd9c8\");\n    ellipse(1, 3, 50, 70);\n    ellipse(2, 5, 60, 70);\n    fill(fillcolor);\n    rect(-8, -10, 25, 25);\n\n    pop();\n  }\n\n  \/\/Flower 2\n  function mikkoflower2(x, y, fillcolor) {\n    push();\n\n    \/\/ petals\n    fill(fillcolor);\n    translate(x, y);\n    noStroke();\n    for (let i = 0; i &lt; 20; i++) {\n      ellipse(0, 8, 70, 10);\n      ellipse(20, 50, 40, 90);\n      ellipse(0, 0, 20, 100);\n      rotate(radians(150));\n    }\n\n    \/\/ center\n    fill(\"#ddd9c8\");\n    ellipse(1, 3, 50, 70);\n    ellipse(2, 5, 60, 70);\n    fill(fillcolor);\n    ellipse(2, 5, 25, 40);\n\n    \/\/ \/\/ stem\n    \/\/ rotate(radians(80));\n    \/\/ strokeWeight(10);\n    \/\/ stroke(fillcolor);\n    \/\/ line(30, 90, 55, 150);\n    pop();\n  }\n\n  \/\/Flower 3\n  function mikkoflower3(x, y, fillcolor) {\n    push();\n\n    \/\/ petals\n    fill(fillcolor);\n    translate(x, y);\n    noStroke();\n    for (let i = 0; i &lt; 20; i++) {\n      ellipse(15, 10, 100, 80);\n      ellipse(0, 50, 40, 90);\n      ellipse(20, 0, 20, 100);\n      rotate(radians(230));\n      scale(1.01);\n    }\n\n    \/\/ center\n    fill(\"#ddd9c8\");\n    ellipse(1, 3, 50, 70);\n    ellipse(2, 5, 60, 70);\n    fill(fillcolor);\n    ellipse(2, 5, 30, 40);\n\n    \/\/     \/\/ \/\/ stem\n    \/\/     rotate(radians(80));\n    \/\/     strokeWeight(15);\n    \/\/     stroke(fillcolor);\n    \/\/     line(30, 90, 55, 150);\n    pop();\n  }\n}\n<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>A wallpaper design inspired by Marimekko Unikko! sketch \/\/Angela Yang \/\/Section C function setup() { createCanvas(600, 700); noLoop(); \/\/frameRate(1); } function draw() { background(&#8220;#ddd9c8&#8221;); scale(0.6); for (let i = 0; i &lt; 7; i++) { for (let j = 0; j &lt; 6; j++) { switch (parseInt(random(3))) { case 0: mikkoflower1(190 * j, 215 * &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/01\/project-05-wallpaper-5\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 05-Wallpaper&#8221;<\/span><\/a><\/p>\n","protected":false},"author":774,"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\/f2022\/wp-json\/wp\/v2\/posts\/73529"}],"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\/774"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=73529"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73529\/revisions"}],"predecessor-version":[{"id":73530,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73529\/revisions\/73530"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=73529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=73529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=73529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}