Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/turtledemo/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/turtledemo/__pycache__/tree.cpython-312.opt-1.pyc

�

&Μgy��n�dZddlmZmZddlmZd�Zd�Zd�Z	e
dk(re	�Zee�e�yy)	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�|dkDr�g}|D]g}|j|�|j�}|j|�|j|�|j	|�|j	|��it|||z||�D]}d���yy�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        �,/usr/local/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�BBc�l�t�}|jd�|j�|jd�|j	�jdd�|j
d�|j�|jd�|j�t|gddd�}|D]}�y)Nr��Zi.������Agffffff�?)r�
setundobuffer�
hideturtle�speed�	getscreen�tracerr
�penupr�pendownr
)r�trs   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
zS)Nzdone: %.2f sec.)�clockr$)r�bs  r�mainr)5s$���g�A��J��g�A���!��$�$r%�__main__N)
�__doc__�turtlerr�timerr'r
r$r)�__name__�msg�print�r%r�<module>r2sC��� $�&��$
�%��z��
�&�C�	�#�J��J�r%

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists