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.
Here is the code inside of the VB.net component:
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.
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.
Source URL: https://www.designcoding.net/fractal-trees/
Copyright ©2024 designcoding unless otherwise noted.