{"id":72610,"date":"2022-09-23T13:22:59","date_gmt":"2022-09-23T17:22:59","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=72610"},"modified":"2022-09-23T13:22:59","modified_gmt":"2022-09-23T17:22:59","slug":"string-art","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/23\/string-art\/","title":{"rendered":"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><div class=\"wp-block-file\"><a class=\"p5_sketch_link\" data-width=\"400\" data-height=\"300\" id=\"wp-block-file--media-6753f1e9-d2b5-4285-801d-f00df41df1d4\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/sketch-329.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\">\/\/Emily Brunner, ebrunner\n\/\/Section C\n\nfunction setup() {\n    createCanvas(400, 300);\n    background(200);\n\n}\n\nfunction draw() {\nbackground(200);\nfor(i = 0; i &lt;= width; i += 10){                 \/\/DARK RED LINES\n    stroke(\"darkred\");\n    line(width\/2 - width, height\/2, i, 0);\n    line(width\/2 - width, height\/2, i, height);\n}\nfor(i = 0; i &lt;= width; i += 10){\n    stroke(\"darkred\");\n    line(width\/2 + width, height\/2, i, 0);\n    line(width\/2 + width, height\/2, i, height);\n}\nfor(i = 0; i &lt;= width; i += 10){\n    stroke(\"darkred\");\n    line(width\/2 + width\/2, height\/2, i, 0);\n    line(width\/2 + width\/2, height\/2, i, height);\n}\nfor(i = 0; i &lt;= width; i += 10){\n    stroke(\"darkred\");\n    line(width\/2 - width\/2, height\/2, i, 0);\n    line(width\/2 - width\/2, height\/2, i, height);\n}\nfor(i = 0; i &lt;= width; i += 10){\n    stroke(\"darkred\");\n    line(width\/2 + width\/3, height\/2, i, 0);\n    line(width\/2 + width\/3, height\/2, i, height);\n}for(i = 0; i &lt;= width; i += 10){\n    stroke(\"darkred\");\n    line(width\/2 - width\/3, height\/2, i, 0);\n    line(width\/2 - width\/3, height\/2, i, height);\n}\nfor(i = 0; i &lt;= width; i += 10){\n    stroke(\"darkred\");\n    line(width\/2 + width\/4, height\/2, i, 0);\n    line(width\/2 + width\/4, height\/2, i, height);\n}for(i = 0; i &lt;= width; i += 10){\n    stroke(\"darkred\");\n    line(width\/2 - width\/4, height\/2, i, 0);\n    line(width\/2 - width\/4, height\/2, i, height);\n}\n\n\n\nfor(i = 0; i &lt;= width; i += 10){         \/\/YELLOW LINES\n    stroke(246, 190, 0);\n    line(width\/5, height\/2, i, 0);\n    line(width\/5, height\/2, i, height);\n}\nfor(i = 0; i &lt;= width; i += 10){\n    stroke(246, 190, 0);\n    line(width\/3 + width\/2, height\/2, i, 0);\n    line(width\/3 + width\/2, height\/2, i, height);\n}\n\n\nfor(i = 0; i &lt;= height; i += 10){             \/\/ORANGE LINES\n    stroke(\"orange\");\n    line(width\/5, height\/2, 0, i);\n    line(width\/5, height\/2, width, i);\n}\nfor(i = 0; i &lt;= width; i += 10){\n    stroke(\"darkorange\");\n    line(width\/3 + width\/2, height\/2, 0, i);\n    line(width\/3 + width\/2, height\/2, width, i);\n}\n}<\/code><\/pre><\/div>\n\n\n\n<p>I had trouble with the math of this project, and understanding how to get the lines to do what I wanted. I didn&rsquo;t get to draw a picture that was similar to what I pictured or found on the internet, but I made something that visually looks appealing so I call that a win. <\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>sketch \/\/Emily Brunner, ebrunner \/\/Section C function setup() { createCanvas(400, 300); background(200); } function draw() { background(200); for(i = 0; i &lt;= width; i += 10){ \/\/DARK RED LINES stroke(&#8220;darkred&#8221;); line(width\/2 &#8211; width, height\/2, i, 0); line(width\/2 &#8211; width, height\/2, i, height); } for(i = 0; i &lt;= width; i += 10){ stroke(&#8220;darkred&#8221;); line(width\/2 + &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/23\/string-art\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;String Art?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":706,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[102,57],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/72610"}],"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\/706"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=72610"}],"version-history":[{"count":3,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/72610\/revisions"}],"predecessor-version":[{"id":72615,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/72610\/revisions\/72615"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=72610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=72610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=72610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}