Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/turtledemo/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/turtledemo/__pycache__/round_dance.cpython-35.pyc



��Yf�@sLdZddlTdd�Zdd�ZedkrHee��e�dS)	aF      turtle-example-suite:

         tdemo_round_dance.py

(Needs version 1.1 of the turtle module that
comes with Python 3.1)

Dancing turtles have a compound shape
consisting of a series of triangles of
decreasing size.

Turtles march along a circle while rotating
pairwise in opposite direction, with one
exception. Does that breaking of symmetry
enhance the attractiveness of the example?

Press any key to stop the animation.

Technically: demonstrates use of compound
shapes, transformation of shapes as well as
cloning turtles. The animation is
controlled through update().
�)�*cCs
dadS)NF)�running�rr�;/opt/alt/python35/lib64/python3.5/turtledemo/round_dance.py�stopsrcCst�td�td�td�d}d}d}d}td�}xftd	�D]X}t|�t�}||9}||9}t|�|j	||d
d|fd�qVWt
d|�td�td�t�td
d�g}xYtd�D]K}t
d�td�td�t�|dd
kr�|jt��q�Wt�datt�t�d}x�trd}	xM|D]E}
|
j
d�|
jd�|
j|	�|	d
kr�dnd}	q�W|dkr�td�t|�|d9}t�qpWdS)NZgray10FZtriangleg}�R��c�?g���y!"@��Zcompound�
g�?ZblackZmultitrir�������Tg�G�z�?zDONE!i8������rr)ZclearscreenZbgcolorZtracer�shapeZShape�rangeZ	shapesizeZ
get_shapepolyZtiltZaddcomponentZregister_shapeZpuZsetpos�fd�lt�update�appendZclone�homerZ
onkeypressrZlisten�right)�fZphi�s�cZsh�i�pZdancersZcsZtaZdancerrrr�mains^



	

$







	






r�__main__N)�__doc__Zturtlerr�__name__�printZmainlooprrrr�<module>s
5