{"id":72760,"date":"2022-09-24T17:15:10","date_gmt":"2022-09-24T21:15:10","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=72760"},"modified":"2022-09-24T17:15:10","modified_gmt":"2022-09-24T21:15:10","slug":"project-04-string-art-8","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/24\/project-04-string-art-8\/","title":{"rendered":"Project 04 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>Throughout this project, I felt it was a little difficult to figure out what I wanted to create, but it was interesting to consider how forms could appear with the use of repeated lines. Originally, I was thinking about a butterfly with the ground and sky as a background, but I decided to use translate and rotate to twist the ground to instead become colorful lines emphasizing the butterfly&rsquo;s movement (instead of the ground) which I think makes it a little more fun and dynamic. <\/p>\n\n\n\n<div><a class=\"p5_sketch_link\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/sketch-351.js\" data-width=\"600\" data-height=\"450\">project3<\/a>\n\n\n\n<p><\/p><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"600\" height=\"450\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/ Rachel Legg \/ rlegg \/ Section C\n\nvar dx1;\nvar dy1;\nvar dx2;\nvar dy2;\nvar dx3;\nvar dy3;\nvar dx4;\nvar dy4;\nvar numLines = 15;\n\nfunction setup() {\n    createCanvas(300, 400);\n    background(0);\n}\n\nfunction draw() {\n\n background(0);\n    \n    \/\/move over orgin and rotate so aligns w\/ butterfly\n    push();   \n    translate(-132, -20);  \n    rotate(radians(15));\n\n\n    \/\/light blue lines toward center @ slant\n    stroke(0);\n    strokeWeight(1);\n    line(0, 300, 10, 390);\n    line(250, 250, 200, 350);\n    dx1 = (10-0)\/numLines;\n    dy1 = (390 - 300)\/numLines;\n    dx2 = (350-250)\/numLines;\n    dy2 = (200 - 250)\/numLines;\n\n\n    stroke(135, 206, 235);    \/\/lightblue \n    var x1 = 0;\n    var y1 = 400;\n    var x2 = 180;\n    var y2 = 300;\n    for (var i = 0; i &lt;= numLines; i += 1){\n        line(x1, y1, x2, y2);\n        x1 += dx1;\n        y1 += dy1;\n        x2 += dx2;\n        y2 += dy2;\n    }\n\n    \/\/layer and tranlate green group to the right\n    push();\n    translate(0, 25);\n    rotate(radians(-15));    \/\/more tilt and move orgin\n    noStroke();\n    strokeWeight(1);\n    line(0, 300, 10, 390);\n    line(250, 250, 200, 350);\n    dx1 = (10-0)\/numLines;\n    dy1 = (390 - 300)\/numLines;\n    dx2 = (350-250)\/numLines;\n    dy2 = (200 - 250)\/numLines;\n\n\n    stroke(144, 238, 144);         \/\/light green\n    var x1 = 0;\n    var y1 = 400;\n    var x2 = 180;\n    var y2 = 300;\n    for (var i = 0; i &lt;= numLines; i += 1){\n        line(x1, y1, x2, y2);\n        x1 += dx1;\n        y1 += dy1;\n        x2 += dx2;\n        y2 += dy2;\n    }\n    pop();\n\n    \/\/layer and tranlate pink group to the right\n    push();\n    translate(0, 55);\n    rotate(radians(-30));\n    noStroke();\n    strokeWeight(1);\n    line(0, 300, 10, 390);\n    line(250, 250, 200, 350);\n    dx1 = (10-0)\/numLines;\n    dy1 = (390 - 300)\/numLines;\n    dx2 = (350-250)\/numLines;\n    dy2 = (200 - 250)\/numLines;\n\n\n    stroke(255, 0, 127);         \/\/pink\n    var x1 = 0;\n    var y1 = 400;\n    var x2 = 180;\n    var y2 = 300;\n    for (var i = 0; i &lt;= numLines; i += 1){\n        line(x1, y1, x2, y2);\n        x1 += dx1;\n        y1 += dy1;\n        x2 += dx2;\n        y2 += dy2;\n    }\n    pop();\n\n\n    \/\/layer and tranlate purple group to the right\n    push();\n    translate(0, 120);\n    rotate(radians(-45));\n    noStroke();\n    strokeWeight(1);\n    line(0, 300, 10, 390);\n    line(250, 250, 200, 350);\n    dx1 = (10-0)\/numLines;\n    dy1 = (390 - 300)\/numLines;\n    dx2 = (350-250)\/numLines;\n    dy2 = (200 - 250)\/numLines;\n\n\n    stroke(147, 112, 219);         \/\/purple\n    var x1 = 0;\n    var y1 = 400;\n    var x2 = 180;\n    var y2 = 300;\n    for (var i = 0; i &lt;= numLines; i += 1){\n        line(x1, y1, x2, y2);\n        x1 += dx1;\n        y1 += dy1;\n        x2 += dx2;\n        y2 += dy2;\n    }\n\n    pop();\n\n    \/\/layer and tranlate yellow group to the right\n    push();\n    translate(0, 170);\n    rotate(radians(-50));      \n    noStroke();\n    strokeWeight(1);\n    line(0, 300, 10, 390);\n    line(250, 250, 200, 350);\n    dx1 = (10-0)\/numLines;\n    dy1 = (390 - 300)\/numLines;\n    dx2 = (350-250)\/numLines;\n    dy2 = (200 - 250)\/numLines;\n\n\n    stroke(\"yellow\");         \/\/yellow\n    var x1 = 0;\n    var y1 = 400;\n    var x2 = 180;\n    var y2 = 300;\n    for (var i = 0; i &lt;= numLines; i += 1){\n        line(x1, y1, x2, y2);\n        x1 += dx1;\n        y1 += dy1;\n        x2 += dx2;\n        y2 += dy2;\n    }\n    pop();\n    pop();\n    \n    \n\n\n\/\/butterfly!!!\n\/\/blue part of wings : top left to bottom right\n    \n    push();\n    translate(175, 15);    \/\/make smaller and move to align w\/ lines\n    rotate(radians(12));\n    scale(2\/5);\n    \n\n    stroke(\"blue\");\n    strokeWeight(2);        \n    line(0, 0, 50, 180);\n    line(250, 220, 300, 400);\n    dx1 = (50 - 0)\/numLines;\n    dy1 = (180 - 0)\/numLines;\n    dx2 = (300 - 250)\/numLines;\n    dy2 = (400 - 220)\/numLines;\n\n    var x1 = 0;\n    var y1 = 0;\n    var x2 = 250;\n    var y2 = 220;\n    for (var i = 0; i &lt;= numLines; i += 1){\n        line(x1, y1, x2, y2);\n        x1 += dx1;\n        y1 += dy1;\n        x2 += dx2;\n        y2 += dy2;\n    }\n\n\n\/\/magenta part of wings : top right to bottom left\n    \n    stroke(\"magenta\");     \n    strokeWeight(2);\n    line(50, 220, 0, 400);\n    line(300, 0, 250, 180);\n    dx3 = (0-50)\/numLines;\n    dy3 = (400 - 220)\/numLines;\n    dx4 = (250 - 300)\/numLines;\n    dy4 = (180 - 0)\/numLines;\n\n    var x3 = 50;\n    var y3 = 220;\n    var x4 = 300;\n    var y4 = 0;\n    for (var i = 0; i &lt;= numLines; i += 1){\n        line(x3, y3, x4, y4);\n        x3 += dx3;\n        y3 += dy3;\n        x4 += dx4;\n        y4 += dy4;\n    }\n\n\/\/butterfly body in center of criss cross\nstroke(\"yellow\");\nstrokeWeight(1);\nnoFill();\n\nfor(var l = 10; l &lt;= 200; l += 10){       \/\/repeated rings make up body\n    ellipse(150, l + 90, 10, 10);\n}\nline((width\/2) + 3, height\/4, (width\/2) + 30, (height\/4) - 35);\nline((width\/2) - 3, height\/4, (width\/2) - 30, (height\/4) - 35);\npop();\n\nnoLoop();\n\n}\n<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Throughout this project, I felt it was a little difficult to figure out what I wanted to create, but it was interesting to consider how forms could appear with the use of repeated lines. Originally, I was thinking about a butterfly with the ground and sky as a background, but I decided to use translate &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/24\/project-04-string-art-8\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 04 String Art&#8221;<\/span><\/a><\/p>\n","protected":false},"author":737,"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\/72760"}],"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\/737"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=72760"}],"version-history":[{"count":2,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/72760\/revisions"}],"predecessor-version":[{"id":73282,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/72760\/revisions\/73282"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=72760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=72760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=72760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}