{"id":73779,"date":"2022-10-04T13:28:59","date_gmt":"2022-10-04T17:28:59","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=73779"},"modified":"2022-10-04T13:34:17","modified_gmt":"2022-10-04T17:34:17","slug":"anabelles-project-04-2","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/04\/anabelles-project-04-2\/","title":{"rendered":"anabelle&#8217;s project 05"},"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>here&rsquo;s my project : D<\/p>\n\n\n\n<div><a class=\"p5_sketch_link\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/10\/sketch-55.js\" data-width=\"600\" data-height=\"600\">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=\"600\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/ anabelle lee .-.\n\/\/ section c\n\/\/ kaylalee\n\/\/ project 5\n\nlet firstSpiralX = [];\nlet firstSpiralY = [];\n\nlet secondSpiralX = [];\nlet secondSpiralY = [];\n\nfunction setup() {\n    createCanvas(600, 600);\n}\n\nfunction draw() {\n    background(185, 70, 44);\n\n    leftHalf();\n    rightHalf();\n\n    push();\n    translate(450, 0);\n    leftHalf();\n    rightHalf();\n    pop();\n\n    push();\n    translate(450, 0);\n    leftHalf();\n    rightHalf();\n    pop();\n\n    \/\/ for bouquets\n    setBouquet();\n    setOtherBouquet();\n\n    noLoop();\n\n}\n\n\/* my functions *\/\nfunction setBouquet(x, y) {\n    for (var centerX = 145; centerX &lt; (width + 50); centerX += 460) {\n        for (var centerY = 175; centerY &lt; height; centerY += 350) {\n            push(); \n            bigGlaze(centerX, centerY);\n            pop();\n        }\n    }\n}\n\nfunction setOtherBouquet() {\nfor (var centerX = 380; centerX &lt; width + 50; centerX += 460) {\n        for (var centerY = 20; centerY &lt; height; centerY += 350) {\n            push(); \n            bigGlaze(centerX, centerY);\n            pop();\n        }\n    }\n}\n\nfunction leftHalf() {\n    for (var theta = 0; theta &lt; height + 50; theta += 10) {\n        glazeBud(-20 + 80*cos(radians(theta)), theta) ;\n    }\n\n    for (var theta = 0; theta &lt; height + 50; theta += 30) {\n        push(); \n        glazeLily(60 + 60*cos(radians(theta)), theta);\n        pop();\n    }\n\n    for (var theta = 0; theta &lt; height + 50; theta += 80) {\n        push(); \n        glazeLinesLoop(30 + 60*cos(radians(theta)), theta);\n        pop();\n    }\n}\n\nfunction rightHalf() {\n    for (var theta = 0; theta &lt; height; theta += 10) {\n        glazeBud(330 + -80*cos(radians(theta)), theta) ;\n    }\n\n    for (var theta = 0; theta &lt; height; theta += 30) {\n        push(); \n        glazeLily(250 + -60*cos(radians(theta)), theta);\n        pop();\n    }\n\n    for (var theta = 0; theta &lt; height; theta += 80) {\n        push(); \n        glazeLinesLoop(280 + -60*cos(radians(theta)), theta);\n        pop();\n    }\n}\n\nfunction glazeLily(x, y) {\n\n    \/\/ large petals\n    push();\n    translate(x, y);\n    for(var i = 0; i &lt;= 5; i += 1) {\n        push();\n        rotate(radians(36 + i*-72));\n        largePetal(7, 25);\n        pop();\n    }\n\n    \/\/ small petals\n    for(var i = 0; i &lt;= 5; i += 1) {\n        push();\n        rotate(radians(i*-72));\n        smallPetal(5, 12.5);\n        pop();\n    } \n    fill(239, 233, 193);\n    noStroke();\n    circle(0, 0, 12.5)\n\n    pop();\n}\n\nfunction smallPetal(w, h) {\n\n    fill(232, 234, 238);\n    stroke(232, 234, 238);\n\n    beginShape(); \/\/ left half of smaller petal\n    vertex(0, -h);\n    bezierVertex(0 - w\/10, -9*h\/10, -2*w, -h\/2, -2*w\/3, 0);\n    endShape();\n\n    beginShape(); \/\/ right half of smaller petal\n    vertex(0, -h);\n    bezierVertex(0 + w\/10, -9*h\/10, 2*w, -h\/2, 2*w\/3, 0);\n    endShape();\n\n    triangle(-0.65*w, 0, 0, -h, 0.65*w, 0); \/\/ fill the smaller petal\n}\n\nfunction largePetal(w, h) {\n\n    fill(114, 181, 223);\n    stroke(148, 162, 228);\n\n    beginShape(); \/\/left half\n    vertex(0, -h);\n    bezierVertex(0 - w\/9, -9*h\/10, -1.5*w, -h\/2, -w\/3, 0);\n    endShape();\n\n    beginShape(); \/\/ right half\n    vertex(0, -h);\n    bezierVertex(0 + w\/9, -9*h\/10, 1.5*w, -h\/2, w\/3, 0);\n    endShape();\n\n    triangle(-w\/3, 0, 0, -h, w\/3, 0); \/\/ fill the smaller petal\n}\n\nfunction glazeBud(x, y) { \n    push();\n    translate(x, y);\n    for(var i = 0; i &lt; 5; i += 1) {\n        push();\n        rotate(radians(i*72));\n        glazeFragment(7, 7);\n        pop();\n    } pop();\n}\n\nfunction glazeFragment(w, h) { \/\/ only draws 1\/5th of glazeBud\n\n    \/\/ big circle\n    fill(148, 162, 228);\n    stroke(148, 162, 228);\n    point(0, 0);\n    arc(0, 0, 2*w, -2*h, radians(225), radians(315));\n\n    \/\/ point arcs\n    \/\/ left\n    stroke(201, 208, 231);\n    noFill();\n    beginShape();\n    vertex(0, -2*h\/3);\n    bezierVertex(-w\/50, -4*h\/8, -w\/10, -3*h\/8, -w\/4, -h\/3);\n    endShape();\n\n    \/\/ right\n    beginShape();\n    vertex(0, -2*h\/3);\n    bezierVertex(w\/50, -4*h\/8, w\/10, -3*h\/8, w\/4, -h\/3);\n    endShape();\n\n    fill(201, 208, 231);\n    arc(0, 0, 4*w\/5, 4*w\/5, radians(225), radians(315));\n    triangle(w\/9, -h\/4, 0, -2*h\/3, -w\/9, -h\/4);\n\n    \/\/ stamen\n    stroke(130, 150, 255);\n    fill(148, 162, 228);\n    circle(-2*w\/5,-h\/2, w\/8);\n    circle(2*w\/5, -h\/2, w\/8);\n    line(-2*w\/5, -h\/2, 0, 0);\n    line(2*w\/5, -h\/2, 0, 0);\n}\n\nfunction glazeLinesLoop(x, y) {\n    push();\n    translate(x, y);\n    for (var i = 0; i &lt;= 5; i += 1) {\n        push();\n        rotate(radians(i*72));\n        glazeLines(10, 25);\n        pop();\n    } pop();\n}\n\nfunction glazeLines(w, h) {\n    noFill();\n    stroke(248, 237, 122);\n\n    beginShape(); \/\/ left half of smaller petal\n    vertex(0, -h);\n    bezierVertex(0 - w\/10, -9*h\/10, -2*w, -h\/2, -2*w\/3, 0);\n    endShape();\n\n    beginShape(); \/\/ right half of smaller petal\n    vertex(0, -h);\n    bezierVertex(0 + w\/10, -9*h\/10, 2*w, -h\/2, 2*w\/3, 0);\n    endShape();\n}\n\nfunction bigGlaze(x, y) {\n\n    \/\/ large petals\n    push();\n    translate(x, y);\n    for(var i = 0; i &lt;= 5; i += 1) {\n        push();\n        rotate(radians(36 + i*-72));\n        bigLargePetal(30, 50);\n        pop();\n    }\n\n    \/\/ small petals\n    for(var i = 0; i &lt;= 5; i += 1) {\n        push();\n        rotate(radians(i*-72));\n        bigSmallPetal(15, 40);\n        pop();\n    } \n\n    fill(239, 233, 193);\n    noStroke();\n    circle(0, 0, 25)\n\n    pop();\n}\n\nfunction bigSmallPetal(w, h) {\n\n    fill(117, 162, 191);\n    stroke(200, 190, 255);\n\n    beginShape(); \/\/ left half of smaller petal\n    vertex(-30, -h);\n    bezierVertex(-30 - w\/10, -9*h\/10, -2*w, -h\/2, -2*w\/3, 0);\n    endShape();\n\n    beginShape(); \/\/ right half of smaller petal\n    vertex(-30, -h);\n    bezierVertex(-30 + w\/10, -9*h\/10, 2*w, -h\/2, 2*w\/3, 0);\n    endShape();\n\n    triangle(-0.65*w, 0, 0, -h, 0.65*w, 0); \/\/ fill the smaller petal\n}\n\nfunction bigLargePetal(w, h) {\n\n    fill(47, 95, 138);\n    stroke(0, 51, 102);\n\n    beginShape(); \/\/left half\n    vertex(-20, -h);\n    bezierVertex(-20 - w\/9, -9*h\/10, -1.5*w, -h\/2, -w\/3, 0);\n    endShape();\n\n    beginShape(); \/\/ right half\n    vertex(-20, -h);\n    bezierVertex(0 + w\/9, -9*h\/10, 1.5*w, -h\/2, w\/3, 0);\n    endShape();\n\n    triangle(-w\/3, 0, 0, -h, w\/3, 0); \/\/ fill the smaller petal\n}<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>here&rsquo;s my project : D sketch \/\/ anabelle lee .-. \/\/ section c \/\/ kaylalee \/\/ project 5 let firstSpiralX = []; let firstSpiralY = []; let secondSpiralX = []; let secondSpiralY = []; function setup() { createCanvas(600, 600); } function draw() { background(185, 70, 44); leftHalf(); rightHalf(); push(); translate(450, 0); leftHalf(); rightHalf(); pop(); push(); &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/04\/anabelles-project-04-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;anabelle&#8217;s project 05&#8221;<\/span><\/a><\/p>\n","protected":false},"author":734,"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\/73779"}],"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\/734"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=73779"}],"version-history":[{"count":2,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73779\/revisions"}],"predecessor-version":[{"id":73782,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73779\/revisions\/73782"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=73779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=73779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=73779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}