Server IP : 162.213.251.212 / Your IP : 52.14.200.7 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/proc/self/root/lib64/python2.7/Demo/turtle/ |
Upload File : |
� Afc@sdZddlZddlmZmZddlmZdefd��YZd�Ze dkr{e�Z e GHe�ndS( s� turtle-example-suite: tdemo_bytedesign.py An example adapted from the example-suite of PythonCard's turtle graphcis. 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. i����N(tTurtletmainloop(tclocktDesignercBsYeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z RS( cCs�|j�xmtd�D]_}|jd|�|j�|j|j�|�|j�|jd|�|jd�qW|j�|j|�|jd�|jd|�|jd�|j�|j d|d|�|j t�dS( Nig�����)P@iHi$g�8@i�i.g������a@(tuptrangetforwardtdowntwheeltpositiontbackwardtrighttgototcenterpiecettracertTrue(tselfthomePostscaleti((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pytdesign!s cCs�|jd�x$td�D]}|j||�qW|j�|jd�x$td�D]}|j||�qXW|jd�xWtd�D]I}|j�|jd�|jd|�|j�|jd|�q�W|jd�|j �j �dS(Ni6ii$iiHi(RRt pentpieceRtleftttripieceRRR t getscreentupdate(RtinitposRR((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyR3s cCs�|j�}|j�|jd|�|jd||�|j�|j|�|j|�|j�|jd|�|jd||�|j�|j|�|j|�|jd�|j �j �dS(Ng@g�?@iH(theadingRR ttripolyrRRt setheadingttripolylRRR(RRRtoldh((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyREs cCsM|j�}|j�|jd|�|j�x2td�D]$}|jd|�|jd�q>W|jd|d|�|j�|j|�|j|�|jd|�|j�x2td�D]$}|jd|�|jd�q�W|j d|d|�|j�|j|�|j|�|j d�|j�j�dS(NiiiiHiK( RRRRRRtpentrRRtpentlRRR(RRRRR((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyRVs, cCsM|d|krdS|j|�|j|�|j|d|||�dS(NigR���Q�?(RRR!(RtsidetangR((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyR!ns cCsM|d|krdS|j|�|j|�|j|d|||�dS(NigR���Q�?(RRR (RR"R#R((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyR ts cCs�|d|krdS|j|�|jd�|j|d�|jd�|j|d�|jd�|j|d|�dS(Niiog{�G�z�?g�������?i�g�?(RRR(RR"R((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyRzs cCs�|d|krdS|j|�|jd�|j|d�|jd�|j|d�|jd�|j|d|�dS(Niiog{�G�z�?g�������?i�g�?(RRR(RR"R((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyR�s cCsM|j|�|j|�|d|kr.dS|j|d|||�dS(Ng@g333333�?(RRR (RtstaR((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyR �s (t__name__t __module__RRRRR!R RRR (((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyRs cCstt�}|jd�|j�|j�jd�|jd�t�}|j|j�d�t�}d||S(Niisruntime: %.2f sec.( Rtspeedt hideturtleRtdelayRRRR (tttattet((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pytmain�s t__main__(t__doc__tmathtturtleRRttimeRRR.R&tmsg(((s4/usr/lib64/python2.7/Demo/turtle/tdemo_bytedesign.pyt<module>su