Your IP : 3.143.7.112


Current Path : /lib64/python3.8/turtledemo/__pycache__/
Upload File :
Current File : //lib64/python3.8/turtledemo/__pycache__/bytedesign.cpython-38.opt-2.pyc

U

e5d��@sTddlmZmZddlmZGdd�de�Zdd�ZedkrPe�Z	e
e	�e�dS)	�)�Turtle�mainloop)�perf_counterc@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�DesignercCs�|��td�D]J}|�d|�|��|�|��|�|��|�d|�|�d�q|��|�|�|�d�|�d|�|�d�|��|�	d|d|�|�
��d	�dS)
N�g�����)P@�H�$g�8@���.g������a@T)�up�range�forward�down�wheel�position�backward�right�goto�centerpiece�	getscreen�tracer)�selfZhomePos�scale�i�r�-/usr/lib64/python3.8/turtledemo/bytedesign.py�design s 


zDesigner.designcCs�|�d�td�D]}|�||�q|��|�d�td�D]}|�||�q>|�d�td�D]:}|��|�d�|�d|�|��|�d|�qb|�d�|�	��
�dS)N�6�rrr�)rr�	pentpiecer�left�tripiecer
rrr�update)r�initposrrrrrr2s 




zDesigner.wheelcCs�|��}|��|�d|�|�d||�|��|�|�|�|�|��|�d|�|�d||�|��|�|�|�|�|�d�|�	��
�dS)Ng@g�?@r)�headingrr�tripolyrrr�
setheading�tripolylr!rr#)rr$r�oldhrrrr"Ds




zDesigner.tripiececCs�|��}|��|�d|�|��td�D]}|�d|�|�d�q.|�d|d|�|��|�|�|�|�|�d|�|��td�D]}|�d|�|�d�q�|�	d|d|�|��|�|�|�|�|�
d�|����dS)N�r�r�K)
r%rr
rrr�pentrrr'�pentlr!rr#)rr$rr)rrrrr Us,




zDesigner.pentpiececCs>|d|krdS|�|�|�|�|�|d|||�dS�N�gR���Q�?)r
r!r.�r�sideZangrrrrr.ms


zDesigner.pentlcCs>|d|krdS|�|�|�|�|�|d|||�dSr/)r
rr-r1rrrr-ss


zDesigner.pentrcCsh|d|krdS|�|�|�d�|�|d�|�d�|�|d�|�d�|�|d|�dS�Nr�og{�G�z�?g�������?�g�?)r
rr&�rr2rrrrr&ys



zDesigner.tripolyrcCsh|d|krdS|�|�|�d�|�|d�|�d�|�|d�|�d�|�|d|�dSr3)r
r!r(r6rrrr(�s



zDesigner.tripolylcCs>|�|�|�|�|d|kr$dS|�|d|||�dS)Ng@g333333�?)r
r!r)r�s�arrrrr�s


zDesigner.centerpieceN)�__name__�
__module__�__qualname__rrr"r r.r-r&r(rrrrrrs

rcCs\t�}|�d�|��|���d�|���d�t�}|�|��d�t�}d||S)Nrr0zruntime: %.2f sec.)	rZspeedZ
hideturtlerZdelayr�clockrr)�tZatZetrrr�main�s
r>�__main__N)Zturtlerr�timerr<rr>r9�msg�printrrrr�<module>su

?>