{"id":902,"date":"2023-09-24T23:55:00","date_gmt":"2023-09-25T05:55:00","guid":{"rendered":"https:\/\/elazaro.uber.space\/?p=902"},"modified":"2023-10-03T21:29:11","modified_gmt":"2023-10-04T03:29:11","slug":"stringing-along","status":"publish","type":"post","link":"https:\/\/www.eldylazaro.com\/?p=902","title":{"rendered":"&#8220;Stringing Along&#8221;"},"content":{"rendered":"\n<p><strong>Goal:<\/strong><\/p>\n\n\n\n<p>This large assignment aims to give you experience with computational design. You will use computer programming in Processing to write algorithms and procedures with turtle geometry and L-systems to generate creative designs. Some of the work you create as part of this assignment will be fabricated (laser-cut) in the next assignment.&nbsp;<\/p>\n\n\n\n<p><strong>GitHub repository: <\/strong><br>https:\/\/github.com\/EldyLazaro\/comp-fab\/tree\/main\/week-4\/<\/p>\n\n\n\n<p><strong>TASK 1: Processing functions<\/strong><br>Use <a href=\"https:\/\/processing.org\/reference\/\"><strong>Processing functions<\/strong><\/a> to create a composite image with the simple geometries listed below in any colors (e.g., background, stroke, fill) of your choosing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Draw<em> <\/em><strong><em>a point<\/em><\/strong><em> <\/em>that is not at the origin.<\/li>\n\n\n\n<li>Use the above-generated point as a starting point to create<em> <\/em><strong><em>a line.<\/em><\/strong><\/li>\n\n\n\n<li>Draw<em> <\/em><strong><em>a circle<\/em><\/strong><em> <\/em>with a well-defined radius.<\/li>\n\n\n\n<li>Draw <strong>a triangle<\/strong>.<\/li>\n\n\n\n<li>Draw <strong><em>a rectangle <\/em><\/strong>(with unequal side lengths).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/elazaro.uber.space\/wp-content\/uploads\/2023\/09\/processing-functions-968x1024.png\" alt=\"\" class=\"wp-image-903\" style=\"width:411px;height:435px\" width=\"411\" height=\"435\" srcset=\"https:\/\/www.eldylazaro.com\/wp-content\/uploads\/2023\/09\/processing-functions-968x1024.png 968w, https:\/\/www.eldylazaro.com\/wp-content\/uploads\/2023\/09\/processing-functions-284x300.png 284w, https:\/\/www.eldylazaro.com\/wp-content\/uploads\/2023\/09\/processing-functions-768x812.png 768w, https:\/\/www.eldylazaro.com\/wp-content\/uploads\/2023\/09\/processing-functions.png 1002w\" sizes=\"auto, (max-width: 411px) 100vw, 411px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>void setup() {\n  \/\/setup code - gets called once\n  size (500, 500);\n  background (64);\n}\n\n\nvoid draw() {\n\n  \/\/ draw a green circle on the left\n  fill(#b2e711);\n  noStroke();\n  circle(200, 200, 100);\n\n  \/\/ draw a line\n  stroke(#00899a);\n  strokeWeight(20);\n  line(230, 110, 230, 400);\n\n  \/\/draw a triangle behind the other shapes\n  fill(#ff7509, 148);\n  noStroke();\n  triangle(150, 300, 350, 200, 450, 300);\n\n  \/\/ draw a rectangle below without fill, just stroke\n  fill(0, 200);\n  stroke(5, 20);\n  rect(70, 280, 300, 50, 5);\n\n  \/\/draw a point\n  stroke(255);\n  strokeWeight(10);\n  point (230, 110);\n}<\/code><\/pre>\n\n\n\n<p><br><strong>TASK 2: Turtle Library<\/strong><br>Use the <a href=\"https:\/\/leahbuechley.com\/Turtle\/\"><strong>Turtle library<\/strong><\/a> (in Processing) to create<strong> <\/strong>the following geometries listed below:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Draw the shapes for capitalized letters<strong><em> \u201c I \u201c <\/em><\/strong>and<strong><em> \u201cT\u201d. <\/em><\/strong>Ensure that you don\u2019t overwrite over paths in order to create these shapes. Hint: You should use the turtle\u2019s penUp and penDown functions.&nbsp;<\/li>\n\n\n\n<li>Draw a <strong>triangle<\/strong> using turtle movement.<\/li>\n\n\n\n<li>Draw a <strong>regular pentagon<\/strong> using the movement of the turtle. Recall that for a regular pentagon, each of the internal angles measures 108\u00b0. In general for a regular polynomial with<strong> a number of sides \u2018k\u2019<\/strong>, the internal angle is given by <strong>[<em>(k-2)\/k]*180<sup>\u00b0<\/sup><\/em><\/strong>.<\/li>\n\n\n\n<li>Draw<em> <\/em><strong><em>a circle<\/em><\/strong><em> <\/em>with a well-defined radius using only turtle movement (<em>do not use built-in functions in Processing<\/em>).<\/li>\n<\/ul>\n\n\n\n<p>See code on <a href=\"https:\/\/github.com\/EldyLazaro\/comp-fab\/tree\/main\/week-4\/\">Github<\/a><br><br><strong>TASK 3: L-system<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Define each of them by \u2014 the vocabulary (variables and constants), axiom, and production rules.<br>For each L-system, list the<strong> first three strings <\/strong>produced after the axiom (beyond iteration n=0).<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use Processing, the Turtle Library, and <strong>LA1_LSystemBase <\/strong>(<a href=\"https:\/\/github.com\/utilityresearchlab\/compfab-2023-fall\/tree\/main\/assignments\">base code on GitHub<\/a>) to program a representation of your system.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In your implementation, be sure to use multiple variables and constants (\u201cF\u201c, \u201cB\u201c, \u201c-\u201c, \u201c+\u201c, and others, etc.) along with push\/pop (e.g., \u201c[\u201c, \u201c]\u201c) to give your L-System a memory (see lecture slides for more details).<\/li>\n<\/ul>\n\n\n\n<p>See code on <a href=\"https:\/\/github.com\/EldyLazaro\/comp-fab\/tree\/main\/week-4\/\">Github<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Goal: This large assignment aims to give you experience with computational design. You will use computer programming in Processing to write algorithms and procedures with turtle geometry and L-systems to &hellip; <a href=\"https:\/\/www.eldylazaro.com\/?p=902\" class=\"more-link\"><span>Continue reading<span class=\"screen-reader-text\">&#8220;Stringing Along&#8221;<\/span><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50],"tags":[49],"class_list":["post-902","post","type-post","status-publish","format-standard","hentry","category-computational-fabrication","tag-computational-fabrication"],"_links":{"self":[{"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=\/wp\/v2\/posts\/902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=902"}],"version-history":[{"count":2,"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=\/wp\/v2\/posts\/902\/revisions"}],"predecessor-version":[{"id":907,"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=\/wp\/v2\/posts\/902\/revisions\/907"}],"wp:attachment":[{"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.eldylazaro.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}