Your IP : 216.73.216.213
��Yf � @ sL d Z d d l Td d � Z d d � Z e d k rH e e � � e � d S) 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().
� )�*c C s
d a d S)NF)�running� r r �;/opt/alt/python35/lib64/python3.5/turtledemo/round_dance.py�stop s r c C s t � t d � t d � t d � d } d } d } d } t d � } xf t d � D]X } t | � t � } | | 9} | | 9} t | � | j | | d
d | f d � qV Wt
d | � t d � t d � t � t d
d � g } xY t d � D]K } t
d � t d � t d � t � | d d
k r� | j t � � q� Wt � d a t t � t � d } x� t r d } xM | D]E }
|
j
d � |
j d � |
j | � | d
k r�d n d } q�W| d k r�t d � t | � | d 9} t � qpWd S)NZgray10FZtriangleg}�R��c�?g���y!"@� � Zcompound�
g �?ZblackZmultitrir �� � � � � � Tg�G�z�?zDONE!i8������r r )ZclearscreenZbgcolorZtracer�shapeZShape�rangeZ shapesizeZ
get_shapepolyZtiltZaddcomponentZregister_shapeZpuZsetpos�fd�lt�update�appendZclone�homer Z
onkeypressr Zlisten�right)�fZphi�s�cZsh�i�pZdancersZcsZtaZdancerr r r �main s^
$
r �__main__N)�__doc__Zturtler r �__name__�printZmainloopr r r r �<module> s
5