{"id":481,"date":"2007-08-01T22:15:37","date_gmt":"2007-08-01T22:15:37","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/2007\/08\/01\/geometric-l-systems\/"},"modified":"2007-08-01T22:15:37","modified_gmt":"2007-08-01T22:15:37","slug":"geometric-l-systems","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2007\/08\/01\/geometric-l-systems\/","title":{"rendered":"Geometric L-systems"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"256px-T-Square_fractal_%288_iterations%29.png\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_229.png?resize=256%2C256\" width=\"256\" height=\"256\" class=\"inset right\" \/><\/p>\n<p> As I alluded to yesterday, there&#8217;s an analogue of L-systems for things more complicated than curves. In fact, there are a variety of them. I&#8217;m going to show you one simple example, called a <em>geometric L-system<\/em>, which is useful for generating a certain kind of iterated function fractal; other variants work in a similar way.<\/p>\n<p><!--more--><\/p>\n<p> I&#8217;m going to show it to you in the context of an interesting fractal figure, called the T-square fractal. The T-square starts with a colored square centered inside of a white square twice its size. In<br \/>\neach iteration, for each of the outermost squares, you create a square one-half it&#8217;s size, and lay a copy of that on each exposed corner of the outermost square, so that the new square overlaps with a square 1\/2 its size.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"tsquare.png\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_230.png?resize=192%2C192\" width=\"192\" height=\"192\" class=\"inset right\" \/><\/p>\n<p> That sounds confusing, but it&#8217;s pretty simple when you see it visually. Here&#8217;s a copy of the T-square after 4 iterations. You can see what I mean about how much easier it is to see visually. The T-square looks much more interesting after a lot of iterations &#8211; at the top of this post, there&#8217;s a copy of it from wikipedia after a bunch of iterations. It&#8217;s an interesting figure in its own right: it&#8217;s quite obviously got a finite area inside of it; but its boundary is infinite. A lot of people actually have a hard time grasping that: the idea of a adding constantly decreasing segments to a finite boundary doesn&#8217;t seem like it should be infinite. It doesn&#8217;t make good intuitive sense. But it&#8217;s pretty easy to show.<\/p>\n<p> Let the length of the sides of the original square be X, so its boundary is 4X. Then in the first step, you add four squares,<br \/>\neach of which eliminate 1\/2 X from the boundary of the original square, but add X\/2+X\/2+X\/4+X\/4 to it. So<br \/>\nafter one step, the length of the boundary is 4X+4(-1\/2X+3\/2X) = 4X+4X: the boundary has <em>doubled<\/em>. In subsequent steps, we&#8217;ll only be adding 3 squares for each of the outermost boxes &#8211; in the next step,<br \/>\nwe&#8217;ll expand the 4 outermost boxes by adding three new ones. So the boundary contributed by each outer square will be 7\/4X. And the next iteration will increase the perimiter of <em>those<\/em> outermost perimeters by the same proportion. The length added to the boundary <em>isn&#8217;t<\/em> decreasing with each iteration after the first: the length added by each new box is cut in reduced; but the number of boxes added more than compensates for the reduction. <\/p>\n<p> But let&#8217;s get back to the geometric L-system. The idea is quite simple; instead of using an L-system over symbols and strings, we&#8217;re going to do something like an L-system over <em>shapes<\/em> and <em>patterns<\/em>. So the initiator is a geometric figure; the left-hand side of a rule is a pattern that matches a part of a shape, and the right hand side shows how to replace the part of the shape that matches the pattern. The pattern can be freely rotated to find a match.  Here&#8217;s the one rule from the geometric L-system for the T-square.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"g-lsystem-tsquare.png\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_231.png?resize=468%2C238\" width=\"468\" height=\"238\" \/><\/p>\n<p> See? Simple! (Ok, not exactly simple, but it&#8217;s not rocket science either. It&#8217;s a quite<br \/>\ncomprehensible way of describing how to construct some pretty hairy iterated function fractals.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I alluded to yesterday, there&#8217;s an analogue of L-systems for things more complicated than curves. In fact, there are a variety of them. I&#8217;m going to show you one simple example, called a geometric L-system, which is useful for generating a certain kind of iterated function fractal; other variants work in a similar way.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[65],"tags":[],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry","category-topology"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-7L","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/comments?post=481"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/481\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}