A Forest

The next step in the development of my tools is a script that creates the “trees” that pierce through the dark inner space. Something that will work with very different sets of variables as I haven’t yet decided on their appearance. However, I have decided on which variables the script will take as input: trunk start and end radius, number of segments between floor and roof and the displacement of these, branching probability and number of recursive generations, twig length, width and angles. These inputs can create very differentiated trees.

Here’s the script in pseudo code:

input variables
pick tree starting points
for each point
- find corresponding point on roof

- find points in between

- draw a line between points
- draw circles along line based on input radius
- loft these circles
- start branching recursion
- - start point along tree line
- - random against branching probability
- - if under - find branch end point
- - draw branch and loft
- - boolean trunk and branches
- - continue recursion until generation limit
boolean trees with roof and floor

The script is still quite far away from being finished but it’s at least a good starting point. The major issues are concerning stability, it still crashes a lot, and the final boolean of the trees with the roof and floor.

//download tree script: create-tree.rvb

1 comment:

idaida said...

vilken olja! kan du inte göra en skogen-vs-oljeindustrin-kommentar genom de här modellerna? nej, jag skojade bara såklart. det börjar se tjusigt ut.