$\xdZddlmZmZddlmZGddeZdZe dk(reZ e e eyy) a turtle-example-suite: tdemo_bytedesign.py An example adapted from the example-suite of PythonCard's turtle graphics. It's based on an article in BYTE magazine Problem Solving with Logo: Using Turtle Graphics to Redraw a Design November 1982, p. 118 - 134 ------------------------------------------- Due to the statement t.delay(0) in line 152, which sets the animation delay to 0, this animation runs in "line per line" mode as fast as possible. )Turtlemainloop) perf_countercBeZdZdZdZdZdZdZdZdZ dZ d Z y ) Designercn|jtdD]{}|jd|z|j|j |j ||j|j d|z|jd}|j|j||jd|jd|z|jd|j|jd|zd||jjd y) Ng)P@H$g8@.ga@T) uprangeforwarddownwheelpositionbackwardrightgoto centerpiece getscreentracer)selfhomePosscaleis )rr&r.rAs rr.zDesigner.tripolylso 1u9 v T # TD[! # TCZ  # dSj%(r c|j||j||d|zkry|j|d|zz ||y)Ng@g333333?)rr&r)rsars rrzDesigner.centerpiecesA Q1 e   cEk*Au5r N) __name__ __module__ __qualname__rrr'r%r5r4r,r.rr rrrs/&$"$"""05 5 ))6r rcLt}|jd|j|jj d|jj dt }|j|jdt }d||z zS)Nrr8zruntime: %.2f sec.) rspeed hideturtlerdelayrclockrr)tatets rmainrRsv AGGAJLLNKKMKKM BHHQZZ\1 B 2b5 ))r __main__N) __doc__turtlerrtimerrNrrRrFmsgprintrIr rrYsH.$&s6vs6j * z &C #J Jr