File: //lib64/python3.8/turtledemo/__pycache__/round_dance.cpython-38.opt-1.pyc
U
e5d @ s8 d Z ddlT dd Zdd Zedkr4ee 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().
)*c C s da d S )NF)running r r ./usr/lib64/python3.8/turtledemo/round_dance.pystop s r c C s t td td td d} d}d}d}td}td D ]D}t| t }|| 9 }|| 9 }t| | ||d
d| fd q>t
d| td td t td
d g }tdD ]:}t
d td td t |d d
kr|t qt datt t d}trd} |D ]6}
|
d |
d |
| | d
krPdnd} q |dk rztd t| |d9 }t qdS )NZgray10FZtriangleg}Rc?gy!"@ Zcompound
g ?ZblackZmultitrir i8 T gGz?zDONE!)ZclearscreenZbgcolorZtracershapeZShaperangeZ shapesizeZ
get_shapepolyZtiltZaddcomponentZregister_shapeZpuZsetposfdltupdateappendZclonehomer Z
onkeypressr Zlistenright)fZphiscZshipZdancersZcsZtaZdancerr r r main s^
r __main__N)__doc__Zturtler r __name__printZmainloopr r r r <module> s 5