Sindbad~EG File Manager

Current Path : /usr/lib64/python3.6/turtledemo/__pycache__/
Upload File :
Current File : //usr/lib64/python3.6/turtledemo/__pycache__/forest.cpython-36.opt-1.pyc

3


 \��@s�dZddlmZmZmZmZddlmZddlm	Z	dd�Z
dd�Zd	d
�Zdd
d�Z
dd�Zdd�Zdd�Zdd�Zdd�Zedkr�e�e�dS)a4     turtlegraphics-example-suite:

             tdemo_forest.py

Displays a 'forest' of 3 breadth-first-trees
similar to the one in tree.
For further remarks see tree.py

This example is a 'breadth-first'-rewrite of
a Logo program written by Erich Neuwirth. See
http://homepage.univie.ac.at/erich.neuwirth/
�)�Turtle�	colormode�tracer�mainloop)�	randrange)�clockcCst||d�S)N�)r)�n�r
�)/usr/lib64/python3.6/turtledemo/forest.py�	symRandomsrcs��fdd�|D�S)Ncs,g|]$\}}|t��|dt��f�qS)g)\��(�?)r)�.0�angle�
sizefactor)�	angledist�sizedistr
r�
<listcomp>szrandomize.<locals>.<listcomp>r
)�
branchlistrrr
)rrr�	randomizesrcCs6x0t|�D]$}|jt|��|jd||�q
WdS)Ng�?)�range�leftrZforward)�tZdistance�partsr�ir
r
r�randomfdsr�
�ccs�|dkr�g}g}x�tt||��D]�\}	}
|	j||�|	jddd|td�dd|td�d�|	j�t|	|||�dVxD|
D]<\}}|	j|�|j|	j	��|jt
|
||��|	j|�q�Wq Wx*t||||d||||�D]
}
dVq�WdS)Nr����r)
�list�zipZpensizeZpencolorr�pendownrr�appendZcloner�right�tree)Ztlist�size�levelZwidthfactorZbranchlistsrrZlstZbrsrrrr�xr
r
rr&s&
r&cCsLtd�|j�|jd�|j�|jd�|j�|j||�|j�dS)Nrr�Z)r�resetZspeed�
hideturtlerZpenupZsetposr#)rr)�yr
r
r�start7s

r.c	Cs2|j�t|dd
�t|gd|ddddgg�}|S)N����Pg�������?�-��G�z�?r��������?���Q��?i0���)r2r3)rr4����)r6r5)r,r.r&)r(�penrr
r
r�doit1Asr8cCs0|j�t|dd	�t|gd|dd
dgg�}|S)
N���xg�������?r2��G�z�?���Q��?iy���i~���)r2r<����)r>r=)r,r.r&)r(r7rr
r
r�doit2Gsr?c	Cs2|j�t|dd
�t|gd|ddddgg�}|S)N�r*�dg�������?r2�ffffff�?r�
ףp=
�?��������?i����)r2rB)rrC����)rErD)r,r.r&)r(r7rr
r
r�doit3MsrFc
Cs�t�}|j�tdd�tdtdd��}tdtdd��}tdtdd��}t�}xHd}x4|||fD]&}y|j�Wq`|d7}Yq`Xq`W|dkrPPqPWtdd	�t�}d
||S)N�Kr�r)Zundobuffersize�r�rzruntime: %.2f sec.)rZhtrr8r?rFr�__next__)�p�u�sr�a�done�br
r
r�mainTs&

rR�__main__N)rr)�__doc__ZturtlerrrrZrandomrZtimerrrrr&r.r8r?rFrR�__name__r
r
r
r�<module>
s



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