Random tree generation

Status
Not open for further replies.
T

Tesla

Guest
GM Version: Studio
Target Platform: Windows

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

Description:
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:

chance

predictably random
Forum Staff
Moderator
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:
T

Tesla

Guest
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.
Thanks, and sorry about the mistakes. I follow template next time i post.
 
Status
Not open for further replies.
Top