Your IP : 216.73.216.213
�
��f� c @ s} d Z d d l m Z m Z d d l m Z d d � Z d d � Z d d � Z e d
k ry e � Z
e e
� e � n d S( u� turtle-example-suite:
tdemo_tree.py
Displays a 'breadth-first-tree' - in contrast
to the classical Logo tree drawing programs,
which use a depth-first-algorithm.
Uses:
(1) a tree-generator, where the drawing is
quasi the side-effect, whereas the generator
always yields None.
(2) Turtle-cloning: At each branching point the
current pen is cloned. So in the end there
are 1024 turtles.
i ( u Turtleu mainloop( u clockc c s� | d k r� g } x[ | D]S } | j | � | j � } | j | � | j | � | j | � | j | � q Wx) t | | | | | � D] } d Vq� Wn d S( u� plist is list of pens
l is length of branch
a is half of the angle between 2 branches
f is factor by which branch is shortened
from level to level.i N( u forwardu cloneu leftu rightu appendu treeu None( u plistu lu au fu lstu pu qu x( ( u4 /opt/alt/python33/lib64/python3.3/turtledemo/tree.pyu tree s
u treec C s� t � } | j d � | j � | j d � | j � j d d � | j d � | j � | j d � | j
� t | g d d d � } x | D] } q� Wt t
| j � j � � � d S( Ni i iZ i� i� iA gffffff�?i.���( u Turtleu
setundobufferu Noneu
hideturtleu speedu getscreenu traceru leftu penupu forwardu pendownu treeu printu lenu turtles( u pu tu x( ( u4 /opt/alt/python33/lib64/python3.3/turtledemo/tree.pyu maketree'