{"id":74452,"date":"2022-10-15T15:55:52","date_gmt":"2022-10-15T19:55:52","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=74452"},"modified":"2022-10-15T15:55:52","modified_gmt":"2022-10-15T19:55:52","slug":"project-07-2","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/15\/project-07-2\/","title":{"rendered":"Project 07"},"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>logarithmic spirals!<\/p>\n<div><a class=\"p5_sketch_link\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/10\/sketch-121.js\" data-width=\"480\" data-height=\"480\">sketch<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"480\" height=\"480\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/ Sowang Kundeling skundeli Section C Project 07\n\nvar theta; \/\/ angle from x-axis\nvar r; \/\/ dist from the origin\nvar nPoints = 700;\n\nfunction setup() {\n    createCanvas(480, 480);\n    angleMode(DEGREES);\n}\n\nfunction draw() {\n    background(28+mouseY, 74, 55+mouseX); \/\/ green\n\n    strokeWeight(2);\n    startAngle = constrain(mouseY, 100, 100);\n  \n    \/\/ spirals\n    stroke(110, 53, 140); \/\/ dark purple\n    logSpiral(mouseY, startAngle);\n    stroke(199, 129, 227) \/\/ light purple\n    logSpiral(mouseY, startAngle+20);\n    stroke(76, 63, 152) \/\/ dark blue\n    logSpiral(mouseX+25, startAngle+40);\n    stroke(136, 128, 224) \/\/ light blue\n    logSpiral(mouseX+50, startAngle+60);\n    stroke(176, 69, 149) \/\/ pink\n    logSpiral(mouseX+75, startAngle+85);\n    stroke(224, 110, 196) \/\/ pink\n    logSpiral(mouseX, startAngle+95);\n\n}\n\nfunction logSpiral(r, theta, color) { \/\/ logarithmic spiral\n    noFill(); \/\/ use noFill or else only one line is shown\n    var a; \/\/ arbitrary constant\n    var b; \/\/ arbitrary constant\n    \n    beginShape();\n    for (i=0; i &lt; nPoints; i++) { \/\/ apply nPoints onto spirals\n        a = (width\/2) + (r+i) * cos(theta+3*i);\n        b = (height\/2) + (r+i) * sin(theta+3*i);\n        vertex(a, b);\n    }\n    endShape();\n}<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>logarithmic spirals! sketch \/\/ Sowang Kundeling skundeli Section C Project 07 var theta; \/\/ angle from x-axis var r; \/\/ dist from the origin var nPoints = 700; function setup() { createCanvas(480, 480); angleMode(DEGREES); } function draw() { background(28+mouseY, 74, 55+mouseX); \/\/ green strokeWeight(2); startAngle = constrain(mouseY, 100, 100); \/\/ spirals stroke(110, 53, 140); \/\/ &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/15\/project-07-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 07&#8221;<\/span><\/a><\/p>\n","protected":false},"author":731,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[107,57],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/74452"}],"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\/731"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=74452"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/74452\/revisions"}],"predecessor-version":[{"id":74454,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/74452\/revisions\/74454"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=74452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=74452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=74452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}