repeat 4 [ forward 100 right 90.0 ]
to ldragon :size :level if :level == 0 [ fd :size stop ] ldragon :size :level - 1 lt 90 rdragon :size :level - 1 end to rdragon :size :level if :level == 0 [ fd :size stop ] ldragon :size :level - 1 rt 90 rdragon :size :level - 1 end pu fd 0.5 rt 90 fd 0.5 pd ldragon 2 13
to tree :level :size if :level > 0 [ setpensize :level/2 if :level < 3 [ setpencolor 10 ] if :level >= 3 [ setpencolor 0 ] fd :size lt 10 tree :level-1 :size*0.8 rt 10 rt 30 tree :level-1 :size*0.8 lt 30 pu back :size pd ] end pu back 200 pd tree 8 60