Your IP : 216.73.216.213
�
��f c @ sO d Z d d l Td d � Z d d � Z e d k rK e e � � e � n d S( uF 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().
i ( u *c C s
d a d S( NF( u Falseu running( ( ( u; /opt/alt/python33/lib64/python3.3/turtledemo/round_dance.pyu stop s u stopc 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 } x\ t d � D]N } t d � t d � t d � t � | d d k r� | j t � � q� q� Wt � d a t t � t � d } x� t rd } xM | D]E }
|
j d � |
j d � |
j | � | d k r�d n d } q�W| d k r�t d � t | � | d 9} n t � qsWd S( Nu gray10u triangleg}�R��c�?g���y!"@i i u compoundi
g �?u blacku multitrii i� i� i i i i g�G�z�?u DONE!Fi8���i����Ti����i����( u clearscreenu bgcoloru traceru Falseu shapeu Shapeu rangeu shapesizeu
get_shapepolyu tiltu addcomponentu register_shapeu puu setposu fdu ltu updateu appendu cloneu homeu Trueu runningu
onkeypressu stopu listenu right( u fu phiu su cu shu iu pu dancersu csu tau dancer( ( u; /opt/alt/python33/lib64/python3.3/turtledemo/round_dance.pyu main s^
$
u mainu __main__N( u __doc__u turtleu stopu mainu __name__u printu mainloop( ( ( u; /opt/alt/python33/lib64/python3.3/turtledemo/round_dance.pyu <module> s
5