{"id":66542,"date":"2021-09-26T05:35:00","date_gmt":"2021-09-26T09:35:00","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/?p=66542"},"modified":"2021-09-26T05:35:00","modified_gmt":"2021-09-26T09:35:00","slug":"project-04-string-art-11","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/09\/26\/project-04-string-art-11\/","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>Emilio Bustamante<\/p>\n\n\n\n<p> My main objective is to create organic shapes when I overlap different lines groups between each other.  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/09\/final-pic.png\" alt=\"\" class=\"wp-image-66543\" width=\"354\" height=\"416\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/09\/final-pic.png 800w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/09\/final-pic-255x300.png 255w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/09\/final-pic-768x902.png 768w\" sizes=\"(max-width: 354px) 85vw, 354px\"><\/figure><pre class=\"wp-block-code\"><code>\nvar dx1;\r\nvar dy1;\r\nvar dx2;\r\nvar dy2;\r\nvar numLines = 40;\r\n\r\nfunction setup() {\r\n    createCanvas(400, 470);\r\n    background(200);\r\n    dx1 = (150-50)\/numLines;\r\n    dy1 = (300-50)\/numLines;\r\n    dx2 = (350-300)\/numLines;\r\n    dy2 = (100-300)\/numLines;\r\n}\r\nfunction draw() {\r\n\/\/drawing in the right\r\n  translate(100, 0);\r\n\/\/group of lines in the left\r\n    var x1 = 150;\r\n    var y1 = 300;\r\n    var x2 = 200;\r\n    var y2 = 120;\r\n    for (var i = 0; i &lt;= numLines; i += 1) {\r\n        line(x1, y1, x2, y2);\r\n        x1 += dx1;\r\n        y1 += dy1;\r\n        x2 += dx2;\r\n        y2 += dy2;\r\n    }\r\n\/\/group of lines in the right\r\n    var x1 = 115;\r\n    var y1 = 300;\r\n    var x2 = 200;\r\n    var y2 = 80;\r\n    for (var i = 0; i &lt;= numLines; i += 1) {\r\n        line(x1, y1, x2, y2);\r\n        x1 += dx1;\r\n        y1 += dy1;\r\n        x2 += dx2;\r\n        y2 += dy2;\r\n    }\r\n\/\/drawing in the left \r\n  translate(-200,0); \r\n\/\/group of lines in the left\r\n    var x1 = 160;\r\n    var y1 = 300;\r\n    var x2 = 200;\r\n    var y2 = 100;\r\n    for (var i = 0; i &lt;= numLines; i += 1) {\r\n        line(x1, y1, x2, y2);\r\n        x1 += dx1;\r\n        y1 += dy1;\r\n        x2 += dx2;\r\n        y2 += dy2;\r\n    }\r\n\/\/group of lines in the right\r\n    var x1 = 130;\r\n    var y1 = 300;\r\n    var x2 = 200;\r\n    var y2 = 100;\r\n    for (var i = 0; i &lt;= numLines; i += 1) {\r\n        line(x1, y1, x2, y2);\r\n        x1 += dx1;\r\n        y1 += dy1;\r\n        x2 += dx2;\r\n        y2 += dy2;\r\n    }\r\n\/\/contour for drawing in the left\r\n    translate(100,0);\r\n    stroke(0,255,0);\r\n    strokeWeight(1.5);\r\n    line(125,0,58,300);\r\n    line(58,300,132,470);\r\n    line(132,470,146,0);\r\n\/\/contour for drawing in the right\r\n    translate(200,0);\r\n    line(130,0,50,300);\r\n    line(50,300,119,470);\r\n    line(119,470,146,0);\r\n    noLoop();\r\n}<\/code><\/pre><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Emilio Bustamante My main objective is to create organic shapes when I overlap different lines groups between each other.<\/p>\n","protected":false},"author":641,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[102],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66542"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/users\/641"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/comments?post=66542"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66542\/revisions"}],"predecessor-version":[{"id":66544,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66542\/revisions\/66544"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/media?parent=66542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/categories?post=66542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/tags?post=66542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}