{"id":5640,"date":"2010-06-27T20:29:28","date_gmt":"2010-06-28T00:29:28","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=5640"},"modified":"2010-06-27T20:29:28","modified_gmt":"2010-06-28T00:29:28","slug":"html-canvas-string-rewriting-fractal","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2010\/06\/27\/html-canvas-string-rewriting-fractal\/","title":{"rendered":"HTML Canvas string-rewriting fractal"},"content":{"rendered":"<p>I&#8217;d hoped to have a working demo in here, but WordPress doesn&#8217;t like the &lt;canvas&gt; element, so here are a couple of static screendumps:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5650\" title=\"a very familiar fractal\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2010\/06\/xf7.png\" alt=\"\" width=\"439\" height=\"221\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2010\/06\/xf7.png 439w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2010\/06\/xf7-160x80.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2010\/06\/xf7-320x161.png 320w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2010\/06\/xf9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-5649\" title=\"looks like a buffalo being attacked by crinkle-cut chips\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2010\/06\/xf9-320x245.png\" alt=\"looks like a buffalo being attacked by crinkle-cut chips\" width=\"320\" height=\"245\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2010\/06\/xf9-320x245.png 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2010\/06\/xf9-160x122.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2010\/06\/xf9.png 790w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a>I wrote a routine in JavaScript that recursively rewrites strings of instructions, then interprets them as a simple turtle-like language to draw on the canvas. In my copious free time, I&#8217;ll release it as a simple web app that you can play with these <a title=\"desc\" href=\"http:\/\/en.wikipedia.org\/wiki\/L-system\">L-systems<\/a>. But you can do some fun stuff <a title=\"L-systems - JSXGraph Wiki\" href=\"http:\/\/jsxgraph.uni-bayreuth.de\/wiki\/index.php\/L-systems\">here<\/a> until I get it written.<\/p>\n<p>(for more details, see Appendix C of H. Peitgen and D. Saupe, Eds. <em>The Science of Fractal Images<\/em>, New York: Springer, 1988.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;d hoped to have a working demo in here, but WordPress doesn&#8217;t like the &lt;canvas&gt; element, so here are a couple of static screendumps: I wrote a routine in JavaScript that recursively rewrites strings of instructions, then interprets them as a simple turtle-like language to draw on the canvas. In my copious free time, I&#8217;ll [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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":[7],"tags":[1750,2171,1741],"class_list":["post-5640","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-fractal","tag-html5","tag-javascript"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-1sY","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/5640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=5640"}],"version-history":[{"count":5,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/5640\/revisions"}],"predecessor-version":[{"id":5651,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/5640\/revisions\/5651"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=5640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=5640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=5640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}