Fractal Trees

by Tuğrul Yazar | April 11, 2015 23:15

Based on this post, the problem of modeling tree-like fractal shapes is still a good question for the early years of computational design education. Last time, I used Rhino’s macro[1] to study these fractal trees in an “impossibly” limited interface. But this time I used a VB.net[2] script.

fractal trees

Here is the code inside of the VB.net component:

fractal trees[3]

Here are the inputs. x is the number of iterations. The Crv input is a line needed for the first iteration. t represents how the tree is going to spread (the angles). Finally, k input is the scale factor for each iteration. The code has two nested loops. The first loop is responsible for the general number of iterations. Then, the second inner loop checks all the lines in the list and draws new lines using the input parameters. You can play with these inputs via Number Sliders as above. In addition, you can play with the code itself to generate interesting results. In the below animation, I played with the t input, which controls the rotation angles for every line segment in every iteration.

fractal trees

You can re-build the definition by looking at the image above and the explanation. While using the VB.net code, you should define the inputs and their data types. You can see this in the above code’s first line. However, if you liked this content and want to support this website by downloading my Grasshopper file, including the script; would you consider being my Patreon? Here is the link to my Patreon page [4]including the working Grasshopper files for the Fractal Trees and more.

Endnotes:
  1. Rhino’s macro: https://www.designcoding.net/category/tools-and-languages/rhino-macro/
  2. VB.net: https://visualstudio.microsoft.com/tr/vs/features/net-development/
  3. [Image]: https://www.designcoding.net/decoder/wp-content/uploads/2023/04/2015_04_11-binary-code.png
  4. Here is the link to my Patreon page : https://www.patreon.com/posts/fractal-trees-81683947?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link

Source URL: https://www.designcoding.net/fractal-trees/