{"id":73051,"date":"2022-09-25T17:16:40","date_gmt":"2022-09-25T21:16:40","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=73051"},"modified":"2022-09-25T17:16:40","modified_gmt":"2022-09-25T21:16:40","slug":"project-04-string-art-13","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/25\/project-04-string-art-13\/","title":{"rendered":"Project-04:\u00a0String 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=\"600\" data-height=\"600\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/sketch-387.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=\"600\" height=\"600\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">var dx1;\nvar dy1;\nvar dx2;\nvar dy2;\nvar numLines = 100;\/\/number of lines\n\nfunction setup() {\n    createCanvas(400, 300);\n    background(158,216,238);\n}\n\nfunction draw() {\n    stroke(\"blue\");\n    line(20, 30, 300, 280);\/\/first line\n    line(350, 300, 400, 0);\/\/second line\n    dx1 = (300-20)\/numLines;\/\/x coordinate on the first line\n    dy1 = (280-30)\/numLines;\/\/y coordinate on the first line\n    dx2 = (400-350)\/numLines;\/\/x coordinate on the second line \n    dy2 = (0-300)\/numLines;\/\/y coordinate on the second line\n\n    var x1 = 20;\n    var y1 = 30;\n    var x2 = 350;\n    var y2 = 300;\n    for (var i = 0; i &lt;= numLines; i += 1) {\n        line(x1, y1, x2, y2);\/\/150 lines between the 2 lines\n        x1 += dx1;\n        y1 += dy1;\n        x2 += dx2;\n        y2 += dy2;\n    }\n\n\n    line(0, 0, 50, 400);\/\/thrid line\n    line(100,250,380, 30);\/\/fourth line\n    dx3 = 50\/numLines;\/\/x coordinate on the third line\n    dy3 = 400\/numLines;\/\/y coordinate on the third line\n    dx4 = (380-100)\/numLines;\/\/x coordinate on the fourth line \n    dy4 = (30-250)\/numLines;\/\/y coordinate on the fourth line\n\n    var x3 = 0;\n    var y3 = 0;\n    var x4 = 100;\n    var y4 = 250;\n    for (var i = 0; i &lt;= numLines; i += 1) {\n        line(x3, y3, x4, y4);\/\/150 lines between the 2 lines\n        x3 += dx3;\n        y3 += dy3;\n        x4 += dx4;\n        y4 += dy4;\n    }\n\n\n    stroke(29,169,200);\n    line(50, 200, 300, 300);\/\/5th line\n    line(360, 300, 400, 100);\/\/6th line\n    dx5 = (300-50)\/numLines;\/\/x coordinate on the 5th line\n    dy5 = (300-200)\/numLines;\/\/y coordinate on the 5th line\n    dx6 = (400-360)\/numLines;\/\/x coordinate on the 6th line \n    dy6 = (100-300)\/numLines;\/\/y coordinate on the 6th line\n\n    var x5 = 50;\n    var y5 = 200;\n    var x6 = 360;\n    var y6 = 300;\n    for (var i = 0; i &lt;= numLines; i += 1) {\n        line(x5, y5, x6, y6);\/\/150 lines between the 2 lines\n        x5 += dx5;\n        y5 += dy5;\n        x6 += dx6;\n        y6 += dy6;\n    }\n\n    noLoop();\n}\n<\/code><\/pre><\/div>\n\n\n\n<p>I created an abstract image of  waves using the technique of string art. It captures the essence of ocean waves and gives the audience a feeling of fluidity.<\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>sketch var dx1; var dy1; var dx2; var dy2; var numLines = 100;\/\/number of lines function setup() { createCanvas(400, 300); background(158,216,238); } function draw() { stroke(&#8220;blue&#8221;); line(20, 30, 300, 280);\/\/first line line(350, 300, 400, 0);\/\/second line dx1 = (300-20)\/numLines;\/\/x coordinate on the first line dy1 = (280-30)\/numLines;\/\/y coordinate on the first line dx2 = (400-350)\/numLines;\/\/x &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/25\/project-04-string-art-13\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project-04:\u00a0String Art&#8221;<\/span><\/a><\/p>\n","protected":false},"author":709,"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\/73051"}],"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\/709"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=73051"}],"version-history":[{"count":3,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73051\/revisions"}],"predecessor-version":[{"id":73056,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73051\/revisions\/73056"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=73051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=73051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=73051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}