Ë
    #´˜jy  ã                   ón   — d Z ddlmZmZ ddlmZ d„ Zd„ Zd„ Z	e
dk(  r e	«       Z ee«        e«        yy)	a—        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.
é    )ÚTurtleÚmainloop)Úperf_counterc              #   ó(  K  — |dkD  r‰g }| D ]g  }|j                  |«       |j                  «       }|j                  |«       |j                  |«       |j	                  |«       |j	                  |«       Œi t        |||z  ||«      D ]  }d–— Œ yy­w)z¤ 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.é   N)ÚforwardÚcloneÚleftÚrightÚappendÚtree)ÚplistÚlÚaÚfÚlstÚpÚqÚxs           ú!lib/python3.12/turtledemo/tree.pyr   r      s…   è ø€ ð 	ˆ1‚uØˆÛˆAØ�I‰I�aŒLØ—‘“	ˆAØ�F‰F�1ŒIØ�G‰G�AŒJØ�J‰J�qŒMØ�J‰J�q�Mð ô �c˜1˜Q™3  1Ö%ˆAØ‹Jñ &ð ùs   ‚BBc                  ól  — t        «       } | j                  d «       | j                  «        | j                  d«       | j	                  «       j                  dd«       | j                  d«       | j                  «        | j                  d«       | j                  «        t        | gddd«      }|D ]  }Œ y )Nr   é   éZ   i.ÿÿÿéÈ   éA   gffffffä?)r   ÚsetundobufferÚ
hideturtleÚspeedÚ	getscreenÚtracerr
   Úpenupr   Úpendownr   )r   Útr   s      r   Úmaketreer$   '   s†   € Ü‹€AØ‡O�O�DÔØ‡L�L„NØ‡G�GˆA„JØ‡K�KƒM×Ñ˜˜AÔØ‡F�Fˆ2„JØ‡G�G„IØ‡I�Iˆd„OØ‡I�I„KÜˆaˆS�#�r˜6Ó"€AÛˆØñ ó    c                  óN   — t        «       } t        «        t        «       }d|| z
  z  S )Nzdone: %.2f sec.)Úclockr$   )r   Úbs     r   Úmainr)   5   s$   € Üƒg€AÜ„JÜƒg€AØ  !¡Ñ$Ð$r%   Ú__main__N)Ú__doc__Úturtler   r   Útimer   r'   r   r$   r)   Ú__name__ÚmsgÚprint© r%   r   Ú<module>r2      sC   ðñ÷  $Ý &òò$ò%ð ˆzÒÙ
‹&€CÙ	ˆ#„JÙ…Jð r%   