1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Random tree generation

Discussion in 'Tutorials' started by Tesla, Jul 21, 2016.

Thread Status:
Not open for further replies.
  1. Tesla

    Tesla Guest

    GM Version: Studio
    Target Platform: Windows

    Download: http://www.filedropper.com/fractree
    Links: n/a

    It's not really a tutorial, but an example. I think the code explains itself well.

    This is just a way if you want to create random trees. This version just creates them and draws them. I am working on now adding verlet to them. It's just about done, so if someone is interested in that version I can upload once I finish.

    Here is a screenshot of few trees:
    Last edited by a moderator: Jul 21, 2016
    Galladhan likes this.
  2. chance

    chance predictably random Forum Staff Moderator

    Apr 22, 2016
    I added the informational template, and fixed your (barely legible) description. Please try to write in complete sentences and use punctuation. Otherwise, it's difficult for members to understand your topic.

    The code in your example is fairly well explained with comments, as you said. Nevertheless, a few words about how it works would be helpful.

    The trees are drawn recursively -- i.e., a script is called, which then calls itself. The recursive "depth" (number of times the script calls itself) is adjustable. And there are a few other adjustable features, such as the style of main trunk and whether leaves are drawn.

    Not too complex, but an example of recursion that members may have fun with. Beginners and intermediate users should be able to follow it and modify it to their needs.
    Last edited: Jul 22, 2016
  3. Tesla

    Tesla Guest

    Thanks, and sorry about the mistakes. I follow template next time i post.
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice