## FILE NAME: fractreeWEB.py from visual import * from fractreemodule import * ###### PARAMETERS for the tree. ### This includes a "shrink" factors - how much each ### branch is smaller than the previous branch - the axislist, which ### is each branch is oriented relative to the previous branch - and ### the poslist - how far along each branch is the next one. shrink = 0.7 axislist=[norm(vector(1,.5,.5)),norm(vector(1,-0.7,0)), norm(vector(1,.4,-.9))] poslist=[0.45,0.3,1] ## This is the part that you will make part of a loop ## give location, orientation of the tree numgenerations = 3 f=frame(pos=(0,-2,0),axis=(0,1,0)) ## print out size of smallest branch and surface area of tree bark. print shrink ** numgenerations, \ fractree(f,shrink,axislist,poslist,1.0,numgenerations)