HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/turtledemo/__pycache__/penrose.cpython-37.opt-1.pyc
B

"��gd
�@s�dZddlTddlmZmZddlmZmZdZ	deded�Z
d	d
�Zdd�Zd
d�Z
dd�Zd&dd�Zdd�Zdd�Zdd�Zdd�Zddeddfdd�Zefd d!�Zd"d#�Zed$kr�e�Ze�d%S)'a�       xturtle-example-suite:

          xtx_kites_and_darts.py

Constructs two aperiodic penrose-tilings,
consisting of kites and darts, by the method
of inflation in six steps.

Starting points are the patterns "sun"
consisting of five kites and "star"
consisting of five darts.

For more information see:
 http://en.wikipedia.org/wiki/Penrose_tiling
 -------------------------------------------
�)�*)�cos�pi)�perf_counter�sleepgP�/7���?���
cCsTt|}td�t|�td�t|�td�t|�td�t|�td�dS)N�$�l�)�f�lt�fd�rt)�l�fl�r�./usr/local/lib/python3.7/turtledemo/penrose.py�kitesrcCsTt|}td�t|�td�t|�td�t|�td�t|�td�dS)Nr
r)r
rrr)rrrrr�dart%srcCs�|dkrFt�\}}tt��t|d�t|d�}}}dt|||f<dSt|}td�t||d�t|�t	d�t
||d�td�t|t�t	d�t
||d�td�t|�t	d	�t||d�td�dS)
NrrTr
�r���)�pos�int�heading�round�tiledictr
r�inflatedartrr�inflatekite�d)r�n�px�py�h�x�yrrrrr!1s(
"r!cCs�|dkrFt�\}}tt��t|d�t|d�}}}dt|||f<dSt|}t||d�td�t|�t	d�t
||d�td�t|t�t	d�t
||d�t|�t	d	�dS)
NrrFrr
r�6�~r)rrrrrr
r!rrrr r")rr#r$r%r&r'r(rrrrr Gs"
"r cCs�t�|t|}t|d|d|�x\tD]T}|\}}}t||�t|�t|rhtd�tdd�ntd�tdd�t�q,WdS)NgY@r�black)rg�?rr)g�?rr)	�clearr
Z	shapesizerZsetpos�
setheading�shapeZcolorZstamp)rr#�th�kr&r'r(rrr�drawZs



r1cCs(x"td�D]}t||�td�q
WdS)N��H)�ranger!r)rr#�irrr�sunjs
r6cCs(x"td�D]}t||�td�q
WdS)Nr2r3)r4r r)rr#r5rrr�staros
r7cCsTtd�t�td�t�tdt��t�td�t�tdt��td�dS)Nr�drrr)�tracerZ
begin_polyrZend_polyZregister_shapeZget_polyrrrrr�
makeshapestsr:cCs$t�t�t�t�td�dS)N�user)�resetZhtZpur:Z
resizemoderrrr�start�s
r=���)rrc
Cs�t|�td�iat�}td�|||�t�}t|||�td�t�}tdd�tD��}tdd�tD��}	td||	||	f�dS)NrrcSsg|]}t|r|�qSr)r)�.0r'rrr�
<listcomp>�sztest.<locals>.<listcomp>cSsg|]}t|s|�qSr)r)r@r'rrrrA�sz"%d kites and %d darts = %d pieces.)�gotor-r�clockr9r1�len�print)
rr#�fun�startposr/�a�b�cZnkZndrrr�test�s
rKcCsPt�xDtd�D]8}t�}td||�t�}||}|dkrtd|�qWdS)N�i,r)r=r4rCrKr)rFr5rHrI�trrr�demo�srNcCsjtd�tddd�tt�td�tt�td�tdd�tddd�td	d
dd�t	d
ddd�dS)NZlogog333333�?rrr+i8���gffffff�?rzPlease wait...�center)zArial Blackr
Zbold)ZalignZfontiXrL)�F�u)rGZDone)
�modeZbgcolorrNr6rr7ZpencolorrB�writerKrrrr�main�s

rT�__main__N)r)�__doc__ZturtleZmathrrZtimerrCrr
r"rrr!r r1r6r7r:r=rKrNrT�__name__�msgZmainlooprrrr�<module>s(