{"id":265,"date":"2012-10-30T22:45:34","date_gmt":"2012-10-31T03:45:34","guid":{"rendered":"http:\/\/dragonlordwarlock.com\/blog\/?p=265"},"modified":"2014-10-01T22:45:21","modified_gmt":"2014-10-02T03:45:21","slug":"a-tree-in-logo","status":"publish","type":"post","link":"https:\/\/dragonlordwarlock.com\/blog\/?p=265","title":{"rendered":"A Tree in Logo"},"content":{"rendered":"<p><a href=\"https:\/\/dragonlordwarlock.com\/blog\/wp-content\/uploads\/2012\/10\/tree.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-thumbnail wp-image-266\" title=\"tree\" src=\"https:\/\/dragonlordwarlock.com\/blog\/wp-content\/uploads\/2012\/10\/tree-150x150.png\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/dragonlordwarlock.com\/blog\/wp-content\/uploads\/2012\/10\/tree-150x150.png 150w, https:\/\/dragonlordwarlock.com\/blog\/wp-content\/uploads\/2012\/10\/tree-300x300.png 300w, https:\/\/dragonlordwarlock.com\/blog\/wp-content\/uploads\/2012\/10\/tree.png 500w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>Lately I been using a dialect of the LOGO programming language (papert). Today I wrote a fractal tree drawing which I am impressed after trying to get the angles right, based on a earlier experiment that used 45 degree angles this one is based on a more natural looking 30 degrees. The result is a very impressive looking tree. I also made one that utilized random numbers to modify branching as to make each tree imperfect and each unique much like real trees. But I have to admit that the perfect one looks the most impressive.<\/p>\n<p>The source code for this is as follows:<\/p>\n<blockquote>\n<pre class=\"lang:default decode:true \" title=\"Fractal Tree in LOGO\">To Tree : x\r\n    if : x&gt;2 [\r\n        fw : x\r\n        lt 30\r\n        tree int[ : x*0.75]\r\n        lt [180-60]\r\n        tree int[ : x*0.75]\r\n        lt 30\r\n        fw : x\r\n    ]\r\nend\r\n\r\nReset\r\nsetxy 250 400\r\nTree 100\r\n<\/pre>\n<p>&nbsp;<\/p><\/blockquote>\n<p>As you can see it is a very impressive program, short but produces a beautiful output. Please note I had to put a space after the colon in the source here so that it would not change into smileys.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lately I been using a dialect of the LOGO programming language (papert). Today I wrote a fractal tree drawing which I am impressed after trying to get the angles right, based on a earlier experiment that used 45 degree angles this one is based on a more natural looking 30 degrees. The result is a &#8230; <a href=\"https:\/\/dragonlordwarlock.com\/blog\/?p=265\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &#8220;A Tree in Logo&#8221;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[32],"tags":[65,64,66],"class_list":["post-265","post","type-post","status-publish","format-standard","hentry","category-programming","tag-fractal","tag-logo","tag-tree"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=265"}],"version-history":[{"count":6,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/265\/revisions"}],"predecessor-version":[{"id":519,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/265\/revisions\/519"}],"wp:attachment":[{"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}