aUCBLogo Demos and Tests / tree2
to tree2 [level 8][size 100][angle 0]
if level==0 [stop]
ifelse level==1 [setPenColor "white][setPenColor "brown]
setPenSize ((List level level)/8)^1*size/6
PenDown
fd size
lt 80+angle
tree22 level-1 size/2 angle
rt 70
(tree2 level-1 size*2/3 angle)
rt 90
tree22 level-1 size/2 angle
lt 80-angle
PenUp
bk size
end
to tree22 level size angle
if level==0 [stop]
ifelse level==1 [setPenColor "white][setPenColor "brown]
setPenSize ((List level level)/8)^1*size/6
PenDown fd size
rt 80-angle
(tree2 level-1 size/2 angle)
lt 70
tree22 level-1 size*2/3 angle
lt 90
(tree2 level-1 size/2 angle)
rt 40
(tree2 level-1 size*4/5 angle)
rt 40+angle
PenUp
bk size
end