{"id":482,"date":"2007-08-03T15:15:18","date_gmt":"2007-08-03T15:15:18","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/2007\/08\/03\/iterated-function-systems-and-attractors\/"},"modified":"2007-08-03T15:15:18","modified_gmt":"2007-08-03T15:15:18","slug":"iterated-function-systems-and-attractors","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2007\/08\/03\/iterated-function-systems-and-attractors\/","title":{"rendered":"Iterated Function Systems and Attractors"},"content":{"rendered":"<p> Most of the fractals that I&#8217;ve written about so far &#8211; including all of the L-system fractals &#8211; are<br \/>\nexamples of something called <em>iterated function systems<\/em>. Speaking informally, an iterated function<br \/>\nsystem is one where you have a <em>transformation function<\/em> which you apply repeatedly. Most iterated<br \/>\nfunction systems work in a <em>contracting<\/em> mode, where the function is repeatedly applied to smaller<br \/>\nand smaller pieces of the original set.<\/p>\n<p> There&#8217;s another very interesting way of describing these fractals, and I find it very surprising<br \/>\nthat it&#8217;s equivalent. It&#8217;s the idea of an <em>attractor<\/em>. An attractor is a <em>dynamical system<\/em> which, no matter what its starting point, will always evolve towards a particular shape. Even if you<br \/>\nperturb the dynamical system, up to some point, the pertubation will fade away over time, and the system<br \/>\nwill continue to evolve toward the same target.<\/p>\n<p><!--more--><\/p>\n<p> The classic example of this is something called <em>the chaos game<\/em>. In the chaos<br \/>\ngame, you take a sheet of paper, and draw three points, A, B, and C. Then you pick a point P<sub>0<\/sub>, something where inside the triangle formed by A,B, and C. Then you do the following repeatedly, for each iteration i+1:<\/p>\n<ol>\n<li> Randomly select one of A, B, and C.<\/li>\n<li> Draw a line segment between the most recent p<sub>i<\/sub> and the selected point. Find<br \/>\nthe midpoint of that segment. That is point p<sub>i+1<\/sub>. Draw a dot on p<sub>i+1<\/sub><\/li>\n<\/ol>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"sier-attract.png\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_232.png?resize=176%2C171\" width=\"176\" height=\"171\" class=\"inset right\" \/><\/p>\n<p> Keep doing that, over and over again. If you try this yourself for a few iterations, you&#8217;ll see<br \/>\nwhy it&#8217;s called the chaos game: the point jumps around seemingly at random within the triangle. The<br \/>\nset of points that results from this seemingly random process is the <em>attractor<\/em> for the<br \/>\ndynamical system described by the chaos game. For example, over to the right, I started with P<sub>0<\/sub>, and then did iterations with line segments from  p<sub>0<\/sub> to A, from p<sub>1<\/sub> to C, from p<sub>2<\/sub> to C, p<sub>3<\/sub> to B, and from p<sub>4<\/sub> back to C.<\/p>\n<p> So what&#8217;s the result? What does the attractor for the chaos game look like?<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"sier-shear.png\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_237.png?resize=204%2C187\" width=\"204\" height=\"187\" class=\"inset right\" \/><\/p>\n<p> It&#8217;s the Sierpinski gasket, distorted so that the triangles are shaped the same as the<br \/>\ntriangle defined by A, B, and C:<\/p>\n<p> For any of the L-system fractals, there&#8217;s a dynamical system for which the fractal is<br \/>\nthe attractor.<\/p>\n<p> Let&#8217;s step back just for a moment. What&#8217;s going on here? The starting point is the dynamical system.<br \/>\nJust what <em>is<\/em> a dynamical system?<\/p>\n<p> A dynamic system is basically a kind of differential equation &#8211; it&#8217;s a rule that specifies a future<br \/>\nstate of a system in terms of a previous state of the system. The states in this system are really points<br \/>\nwithin some kind of topologial manifold. Every dynamical system has something called a <em>state space<\/em><br \/>\n&#8211; that is, the space which includes the set of points within the manifold that are reachable by some<br \/>\nsequence of iterations of the system. <\/p>\n<p> On some level, the basic study of differential equations &#8211; what most of us math geeks studied in our<br \/>\ndiffeq courses in college is largely about trying to find <em>closed form<\/em> equivalents of a given<br \/>\ndynamical system: that is, a solution for the system where you can find the value of the state of a system<br \/>\nat a specified point in time in one step, without needing to iterate through its previous states. <\/p>\n<p> The attractor is the set defined by a dynamical system. What makes it an attractor is the somewhat<br \/>\nodd property that instead of varying<br \/>\nwildly, the attractor will always try to push the system back into its basic space. Its state space<br \/>\nis strongly centered on some basic set of points, and it will always drift back towards those points. Fractal attractors (also called <em>strange attractors<\/em>) are dynamical systems with a fractal<br \/>\nstructure. The chaos game contains embedded within it the self-similarity property of the<br \/>\nSierpinski gasket; so its attractor set has that structure.<\/p>\n<p> For another fascinating example of this, taken from <a href=\"http:\/\/online.redwoods.cc.ca.us\/instruct\/darnold\/ifs\/\">this excellent explanation of<br \/>\niterated function systems<\/a>, here&#8217;s a more complex dynamical system. The<br \/>\nway that it works is that there are 4 possible rules for getting the next point, each of which<br \/>\nhas an assigned probability. The next rule is selected randomly, according to the specified<br \/>\nprobability distribution.<\/p>\n<table>\n<tr>\n<th>Rule<\/th>\n<th>Probability<\/th>\n<th>Next X<\/th>\n<th>Next Y<\/th>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>1\/100<\/td>\n<td>0.16<\/td>\n<td>0x+0y<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>85\/100<\/td>\n<td>0.85x+0.04y<\/td>\n<td>-0.04x+0.85y+1.6<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>7\/100<\/td>\n<td>0.2x-0.26y<\/td>\n<td>0.23x+0.22y+1.6<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>7\/100<\/td>\n<td>-0.15x+0.28y<\/td>\n<td>0.26x+0.24y+0.44<\/td>\n<\/tr>\n<\/table>\n<p> This is the classic Barnsley Fern fractal:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"fb.gif\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_234.gif?resize=150%2C272\" width=\"150\" height=\"272\" \/><\/p>\n<p> That strange set of equations contains the structure of a fern. <\/p>\n<p> One of the interesting things about the notion of fractal attractors is that one of the objections<br \/>\nto fractals is that they&#8217;re too irregular, too strange. Mathematicians tend to like things to be clean and simple. They like continuous, differentiable functions; they like their diffEQs to have closed forms. The idea that <em>most<\/em> functions are irregular, and that the functions we&#8217;ve spent so much time studying are less than a grain of sand on the beach is a depressing one to most people in math. One<br \/>\nof the things that originally caused some resistance to the idea of fractals is that they&#8217;re <em>not<\/em> from the world of clean functions, the world of regularity and continuity that we so adore.<br \/>\nBut the fact that attractors include fractals &#8211; that out of the universe of iterative systems, nearly<br \/>\nall of them escape &#8211; turn into erratic scattering chaos, except for the tiny spec of dust that we call attractors &#8211; that tells us that fractals are part of the world of things that we can analyze and understand, even if they seem strange.<\/p>\n<p> We can understand what these iterative functions systems do &#8211; how they generate the fractal attractors &#8211; by looking at them as affine transformations, and appyling techniques from conventional euclidean geometry to them. Next post, I&#8217;ll show you <em>why<\/em> the chaos game is just another way of defining the<br \/>\nSierpinski gasket.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most of the fractals that I&#8217;ve written about so far &#8211; including all of the L-system fractals &#8211; are examples of something called iterated function systems. Speaking informally, an iterated function system is one where you have a transformation function which you apply repeatedly. Most iterated function systems work in a contracting mode, where the [&hellip;]<\/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":[86],"tags":[],"class_list":["post-482","post","type-post","status-publish","format-standard","hentry","category-fractals"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-7M","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/482","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=482"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/482\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=482"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}