Skip to content
DragonlordWarlock.com

DragonlordWarlock.com

Home of the Dragonlord Warlock/Norin Nightfire

  • Home
  • About Me
  • Poetry
  • Photos
  • Programming
  • Wallpaper
  • Norin Nightfire
  • Privacy Policy
  • Home
  • A Tree in Logo

A Tree in Logo

Posted on 2012-10-302014-10-01 By Administrator
programming

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.

The source code for this is as follows:

To Tree : x
    if : x>2 [
        fw : x
        lt 30
        tree int[ : x*0.75]
        lt [180-60]
        tree int[ : x*0.75]
        lt 30
        fw : x
    ]
end

Reset
setxy 250 400
Tree 100

 

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.

 

Tags: Fractal LOGO Tree

Post navigation

❮ Previous Post: Fractalus
Next Post: Cruxshadows – Birthday ❯

You may also like

hello world
Hello World ooREXX
2007-08-26
javascript
Javascript
2012-11-18
c++
Linkable Object C++ Hello World
2019-06-19
downloading
Batch downloading with REXX and WGET
2007-08-15

Archives

Categories

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Advert

  • Facebook

Copyright © 2026 DragonlordWarlock.com.

Theme: Oceanly News Dark by ScriptsTown