{"id":177,"date":"2014-02-07T02:07:21","date_gmt":"2014-02-07T00:07:21","guid":{"rendered":"http:\/\/blog.teleranek.org\/?p=177"},"modified":"2025-06-29T12:29:13","modified_gmt":"2025-06-29T10:29:13","slug":"algorithmic-fractalish-flowers","status":"publish","type":"post","link":"https:\/\/blog.teleranek.org\/?p=177","title":{"rendered":"Algorithmic fractalish Flowers"},"content":{"rendered":"<p>There&#8217;s winter behind the window, so I&#8217;ve decided to grow my own plants.<br \/>\nThere are many examples of interactive tree\/plants generation, mainly done using a recursive algorithm, that draws a vertical line, then splits it on 2, then these 2 splits again and so on. I wanted to make something different, something like plant\/foil-type graphics that were popular back in ~2005 year (then there was a boom for mirrors everywhere, like OSX cover flow, now we want everything to be made using drawRect method, like Windows8 ;) ).<br \/>\nThis is an example:<br \/>\n<img decoding=\"async\" src=\"http:\/\/blog.teleranek.org\/wp-content\/uploads\/2014\/02\/03_plants-leaf-flower-swirl-ornament-foliage-free-photoshop-brush.jpg\" alt=\"old-style photoshop brush\" \/><br \/>\nor:<br \/>\n<img decoding=\"async\" src=\"http:\/\/blog.teleranek.org\/wp-content\/uploads\/2014\/02\/swirl-photoshop-brushes-4.jpg\" alt=\"old-style foliage\" \/><\/p>\n<p>Maybe this is because videocopilot released a bunch of flower-like assets for photoshop and everybody used them. Some time ago they released particle effects of falling dust or snow with great dose of bokeh &#8211; then I saw it in hundreds of commercials and billboards.<br \/>\nOK, so this is the tree-drawer.<br \/>\nScreenshot:<br \/>\n<a href=\"http:\/\/blog.teleranek.org\/wp-content\/uploads\/2014\/02\/Zrzut-ekranu-2014-02-07-00.45.11.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.teleranek.org\/wp-content\/uploads\/2014\/02\/Zrzut-ekranu-2014-02-07-00.45.11-1024x523.png\" alt=\"\" title=\"screenshot\" width=\"1024\" height=\"523\" class=\"aligncenter size-large wp-image-178\" srcset=\"https:\/\/blog.teleranek.org\/wp-content\/uploads\/2014\/02\/Zrzut-ekranu-2014-02-07-00.45.11-1024x523.png 1024w, https:\/\/blog.teleranek.org\/wp-content\/uploads\/2014\/02\/Zrzut-ekranu-2014-02-07-00.45.11-300x153.png 300w, https:\/\/blog.teleranek.org\/wp-content\/uploads\/2014\/02\/Zrzut-ekranu-2014-02-07-00.45.11.png 1617w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p><strong>Program:<\/strong><br \/>\n<a href=\"http:\/\/exp.teleranek.org\/sumtings\/foil\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">FOLIAGE<\/a><\/p>\n<p>I did it in Flash, in JS canvas it would be slow to perform and slow to code.<br \/>\nI&#8217;ve made a button that allows you to save your graphics. Bad luck I did it now, since flowery design isn&#8217;t very fancy today, better if I did some Windows 8 &#8211; style rectangle drawer ; )<br \/>\nSettings &#8211; settings are pretty self-explanatory, if some are not then you are free to experiment.<\/p>\n<p>If an app detects that there are too many leaves to draw, then it doesn&#8217;t draw new leaves, until old leaves are drawn. Esp. when you set a level of recursion too high, then it may get very cpu-intensive.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s winter behind the window, so I&#8217;ve decided to grow my own plants. There are many examples of interactive tree\/plants generation, mainly done using a recursive algorithm, that draws a vertical line, then splits it on 2, then these 2 splits again and so on. I wanted to make something different, something like plant\/foil-type graphics [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[80,79,78,77],"class_list":["post-177","post","type-post","status-publish","format-standard","hentry","category-flash-experiments","tag-fractals","tag-interactive-drawing","tag-plant-drawing","tag-tree-algorithm"],"_links":{"self":[{"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/posts\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=177"}],"version-history":[{"count":7,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":348,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions\/348"}],"wp:attachment":[{"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}