{"id":72991,"date":"2022-09-25T00:03:59","date_gmt":"2022-09-25T04:03:59","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=72991"},"modified":"2022-09-25T00:05:09","modified_gmt":"2022-09-25T04:05:09","slug":"project-4-string-art-5","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/25\/project-4-string-art-5\/","title":{"rendered":"Project 4: String Art"},"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>Just try to imagine waking up to this in the middle of the night. Best 70s themed dreamscape ever. That&rsquo;s the whole piece. That&rsquo;s it. A portal to the disco dimension.<\/p>\n\n\n\n<div><a class=\"p5_sketch_link\" data-width=\"400\" data-height=\"300\" id=\"wp-block-file--media-fde133ee-a40c-4518-b75e-73fa60efbe6b\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/sketch-380.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=\"400\" height=\"300\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/Ilyas Khan\r\n\/\/Section D\r\n\/\/Entitled \"Disco Portal\"\r\n\/\/Why, you may ask, did I make it disco? Because I like disco, and I like random color changes.\r\n\r\ncount = 0;\r\nfunction setup() {\r\n    createCanvas(400, 300);\r\n    background(0);\r\n}\r\nfunction draw() {\r\n    background(0); \/\/keeps the loop from getting messy\r\n    frameRate(5); \/\/makes it possible for one to perceive the color changes\r\n    stroke(random(100,255),random(100,255),random(100,255)); \/\/Makes this the portal to the disco dimension\r\n    let count = 0;\r\n    let y1 = 0;\r\n    let y2 = 0;\r\n    let x1 = 0;\r\n    let x2 = 0;\r\n    let x3 = 0;\r\n    var limitX1 = 150;\r\n    var limitX2 = 250;\r\n    var limitY1 = 50;\r\n    var limitY2 = 250;\r\n    strokeWeight(0.5);\r\n    for(y1 = -400; y1 &lt; limitY1; y1 += 4.75){ \/\/top of doorframe\r\n        x3 = limitX2-(1.25*count);\r\n        x1 = limitX1+(1.25*count);\r\n        y2 = limitY1-(0.25*count);\r\n        line(x1,y2,x1+300,y1);\r\n        line(x3,y2,x3-300,y1);\r\n        count += 1;\r\n    }\r\n    for(y1 = limitY1; y1 &lt; limitY2+100; y1 += 7.75){ \/\/left side of doorframe\r\n        x1 = limitX1;\r\n        x2 -= 4.5;\r\n        y2 -= 7.75;\r\n        line(x1,y1,x2,y2+300);\r\n        count += 1;\r\n    }\r\n    for(y1 = limitY1; y1 &lt; limitY2+100; y1 += 7.75){ \/\/right side of doorframe\r\n        x1 = limitX2;\r\n        x2 = limitX2-(4.5*count);\r\n        y2 += 7.75;\r\n        line(x1,y1,1.05*-x2,-y2+50);\r\n        count += 1;\r\n    }\r\n    for(y1 = 800; y1 &gt; limitY2; y1 -= 9){ \/\/floor\r\n        x3 = limitX2;\r\n        x1 = limitX1;\r\n        y2 = limitY2-(0.05*count);\r\n        line(x1,y2,x1+300,y1);\r\n        line(x3,y2,x3-300,y1);\r\n        count += 1;\r\n    }\r\n\r\n}<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Just try to imagine waking up to this in the middle of the night. Best 70s themed dreamscape ever. That&rsquo;s the whole piece. That&rsquo;s it. A portal to the disco dimension.<\/p>\n","protected":false},"author":725,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[102,58],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/72991"}],"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\/725"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=72991"}],"version-history":[{"count":5,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/72991\/revisions"}],"predecessor-version":[{"id":73003,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/72991\/revisions\/73003"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=72991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=72991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=72991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}