Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.138.101.93
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : bytedesign.cpython-310.pyc
o

_b��@s\dZddlmZmZddlmZGdd�de�Zdd�Ze	dkr,e�Z
ee
�e�d	Sd	S)
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.
�)�Turtle�mainloop)�perf_counterc@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�DesignercCs�|��td�D]%}|�d|�|��|�|��|�|��|�d|�|�d�q|��|�|�|�d�|�d|�|�d�|��|�	d|d|�|�
��d	�dS)
N�g�����)P@�H�$g�8@���.g������a@T)�up�range�forward�down�wheel�position�backward�right�goto�centerpiece�	getscreen�tracer)�selfZhomePos�scale�i�r�>/usr/local/python-3.10/lib/python3.10/turtledemo/bytedesign.py�design s 


zDesigner.designcCs�|�d�td�D]}|�||�q	|��|�d�td�D]}|�||�q|�d�td�D]}|��|�d�|�d|�|��|�d|�q1|�d�|�	��
�dS)N�6�rrr�)rr�	pentpiecer�left�tripiecer
rrr�update)r�initposrrrrrr2s 




zDesigner.wheelcCs�|��}|��|�d|�|�d||�|��|�|�|�|�|��|�d|�|�d||�|��|�|�|�|�|�d�|�	��
�dS)Ng@g�?@r)�headingrr�tripolyrrr�
setheading�tripolylr!rr#)rr$r�oldhrrrr"Ds




zDesigner.tripiececCs�|��}|��|�d|�|��td�D]}|�d|�|�d�q|�d|d|�|��|�|�|�|�|�d|�|��td�D]}|�d|�|�d�qL|�	d|d|�|��|�|�|�|�|�
d�|����dS)N�r�r�K)
r%rr
rrr�pentrrr'�pentlr!rr#)rr$rr)rrrrr Us,




zDesigner.pentpiececC�>|d|krdS|�|�|�|�|�|d|||�dS�N�gR���Q�?)r
r!r.�r�sideZangrrrrr.m�

zDesigner.pentlcCr/r0)r
rr-r2rrrr-sr4zDesigner.pentrcC�h|d|krdS|�|�|�d�|�|d�|�d�|�|d�|�d�|�|d|�dS�Nr�og{�G�z�?g�������?�g�?)r
rr&�rr3rrrrr&y�



zDesigner.tripolyrcCr5r6)r
r!r(r9rrrr(�r:zDesigner.tripolylcCs>|�|�|�|�|d|krdS|�|d|||�dS)Ng@g333333�?)r
r!r)r�s�arrrrr�szDesigner.centerpieceN)�__name__�
__module__�__qualname__rrr"r r.r-r&r(rrrrrrs

rcCs\t�}|�d�|��|���d�|���d�t�}|�|��d�t�}d||S)Nrr1zruntime: %.2f sec.)	rZspeedZ
hideturtler�delayr�clockrr)�tZat�etrrr�main�s
rD�__main__N)�__doc__Zturtlerr�timerrArrDr=�msg�printrrrr�<module>su
�
© 2025 GrazzMean