This is a simple and highly customizable tree fractal generator for psychophysical experiments.
- python 2.7
- PIL
- turtle
- string
- os
- numpy
just call main.py from the command line! Numerous settings can be changed to alter the tree's appearance:
- numIters : maximum number of iterations (=recursive calls)
- treeColourBase : colour of tree
- numStem : number of iterations without leaves
- stemColourVari : variability in colour of stem
- stemLength : length of stem
- stemWidthFactor : proportional width of stem
- branchAngleBase : angle between child edge and parent edge
- branchAngleRange : range of possible angles
- branchColourVari : variability in colour of branches
- branchShrinkage : reduction in branch-size on each iteration
- branchShrinkageRange : range of shrinkage noise
- branchWidthFactor : proportional width of potentially leafy branch
- branchMin : minimum branch length
- probaLeftBranch : branch to the left
- probaStraightBranch : proceed with straight line
- probaRightBranch : branch to the right
- leafNum : max Num of leaves per branch
- leafSize : size of leaf image
- leafSizeVariance : variance in leaf size
- leafFractionBehind : percentage of leaves that go behind tree
- leafMinBrightness : minimal brightness of leaves
- leafMaxBrightness : maximal brightness of leaves
- probaFruit : probability of fruit growth
- probaLeaf : probability of leaf growth