{"id":504,"date":"2007-09-06T21:50:42","date_gmt":"2007-09-06T21:50:42","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/2007\/09\/06\/fractal-mountains\/"},"modified":"2007-09-06T21:50:42","modified_gmt":"2007-09-06T21:50:42","slug":"fractal-mountains","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2007\/09\/06\/fractal-mountains\/","title":{"rendered":"Fractal Mountains"},"content":{"rendered":"<p> When you mention fractals, one of the things that immediately comes to mind for most people<br \/>\nis fractal landscapes. We&#8217;ve all seen amazing images of mountain ranges, planets, lakes, and things<br \/>\nof that sort that were generated by fractals.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"mount2.gif\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_261.gif?resize=227%2C168\" width=\"227\" height=\"168\" class=\"inset right\" \/><\/p>\n<p> Seeing a fractal image of a mountain, like the one in this image (which I found<br \/>\n<a href=\"http:\/\/www.lsi.upc.es\/~marc\/images.html\">here<\/a> via a google image search for &#8220;fractal mountain&#8221;), I expected to find that<br \/>\nit was based on an extremely complicated fractal. But the amazing thing about fractals is how<br \/>\ncomplexity emerges from simplicity. The basic process for generating a fractal mountain &#8211; and many other elements of fractal landscapes &#8211; is astonishingly simple.<\/p>\n<p><!--more--><br \/>\n<img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"koch.jpg\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_262.jpg?resize=216%2C227\" width=\"216\" height=\"227\" class=\"inset right\" \/><\/p>\n<p> The basic idea is standard fractal self-symmetry, with a dash of randomness. Remember the basic<br \/>\nKoch curve? In a Koch curve, we took straight line segments, and replaced them with a new structure made<br \/>\nof a slightly more complex set of segments &#8211; and then replaced those, and so on, like in this image. By introducing a bit of randomness, you can get some pretty compelling coastlines, as you can see in my<br \/>\n<a href=\"http:\/\/scientopia.org\/blogs\/goodmath\/2007\/07\/fractal-curves-and-coastlines\">original post on the Koch curve.<\/a><\/p>\n<p> For landscapes, you need to be a bit more sophisticated than that &#8211; but not by much. For a two dimensional image of a mountain, you use a simple slightly randomized process &#8211; a randomizing L-system.<br \/>\nThe basic idea is to start with a triangle; and to subdivide it into smaller triangles by dividing each edge into two sub-segments, and then creating a triangle that connects the point where the sub-segments meet. As a non-random geometric L-system, here&#8217;s the replacement rule:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"triangle-lsystem.png\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_263.png?resize=282%2C147\" width=\"282\" height=\"147\" \/><\/p>\n<p> All we need to do is randomize that slightly. When we divide an edge into two sub-segments, we&#8217;ll<br \/>\nmove their connection point slightly. Just look at the pictures to see two steps of the process. Repeat that 10 times, and you&#8217;ve got an amazingly detailed image of a mountain.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"landscape-2.png\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_264.png?resize=435%2C191\" width=\"435\" height=\"191\" \/><\/p>\n<p> Now, suppose you want a real three dimensional mountain. Start with a triangle. Grab a point inside the triangle, and randomly move it. Then draw a line from each corner of the original triangle to that point. You&#8217;ve replaced the triangle with a sort of irregular pyramid. Each of the faces is a triangle. Repeat the process with them. Keep doing that. If you set the parameters correctly for the randomizer which determines how far to point relative to the size of the triangle, you can get an amazing image of<br \/>\na mountain.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"mountain.png\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_265.png?resize=298%2C158\" width=\"298\" height=\"158\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you mention fractals, one of the things that immediately comes to mind for most people is fractal landscapes. We&#8217;ve all seen amazing images of mountain ranges, planets, lakes, and things of that sort that were generated by fractals. Seeing a fractal image of a mountain, like the one in this image (which I found [&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-504","post","type-post","status-publish","format-standard","hentry","category-fractals"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-88","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/504","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=504"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/504\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=504"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}