Thingiverse
Imperfect Random Fractal Tree
by LHartmann
45
Downloads
48
Likes
0
Makes
Decided to play a little with openscad while my noodles were cooking. Fractal generation using recursive modules was something I wanted to try, so I started coding a planar cross type fractal... I got excited about it, added 3d rotations and some randomness to the algorithm and I got some nice looking trees.
Thanks to the random number generator the tree will look different every time you open it.
Decided to publish the tree, throw away the goop cooking on the stove, and order some pizza.
Warning: This algorithm is O(5^n) complexity, so anything above n=6 will take your computer a while to render...
Update on v2:
- Support for fractional n, intermediate states between floor(n) and ceil(n).
- Allows caller to supply the random seed (pun intended) for repeatable results.
- Fixed orientation, now tree grows towards Z+ not X+.
- Changed trunk and leaf width formulas, now using cones instead of cylinders for better looks.
Using v2 one can create progressive complexity
Thanks to the random number generator the tree will look different every time you open it.
Decided to publish the tree, throw away the goop cooking on the stove, and order some pizza.
Warning: This algorithm is O(5^n) complexity, so anything above n=6 will take your computer a while to render...
Update on v2:
- Support for fractional n, intermediate states between floor(n) and ceil(n).
- Allows caller to supply the random seed (pun intended) for repeatable results.
- Fixed orientation, now tree grows towards Z+ not X+.
- Changed trunk and leaf width formulas, now using cones instead of cylinders for better looks.
Using v2 one can create progressive complexity
Did you print this model? Sign in and share your make!
Sign in to leave a comment
Sign inNo comments yet – be the first!