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.10/turtledemo/__pycache__/penrose.cpython-310.opt-1.pyc
o

�i4
�@s�dZddlTddlmZmZddlmZmZdZ	deded�Z
d	d
�Zdd�Zd
d�Z
dd�Zd&dd�Zdd�Zdd�Zdd�Zdd�Zddeddfdd�Zefd d!�Zd"d#�Zed$krge�Ze�d%Sd%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.10/turtledemo/penrose.py�kite�rcCsTt|}td�t|�td�t|�td�t|�td�t|�td�dS)Nr
rr
rrrr�dart%rrcCs�|dkr#t�\}}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�tiledictrr�inflatedartrr�inflatekite�d�r�nZpx�py�h�x�yrrrrr$1s(
"r$cCs�|dkr#t�\}}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)rrr r!r"rr$rrrr#r%r&rrrr#Gs"
"r#cCs�t�|t|}t|d|d|�tD]*}|\}}}t||�t|�t|r3td�tdd�n	td�tdd�t�qdS)NgY@r�black)r��?rr)r/rr)	�clearrZ	shapesizer"Zsetpos�
setheading�shapeZcolorZstamp)rr'�th�kr)r*r+rrr�drawZs


�r5cC�$td�D]}t||�td�qdS�N��H)�ranger$r�rr'�irrr�sunj�

�r=cCr6r7)r:r#rr;rrr�staror>r?cCsTtd�t�td�t�tdt��t�td�t�tdt��td�dS)Nr�drrr)�tracerZ
begin_polyrZend_polyZregister_shapeZget_polyrrrrr�
makeshapestsrBcCs$t�t�t�t�td�dS)N�user)�resetZhtZpurBZ
resizemoderrrr�start�s
rE���)rrcCsxt|�td�iatd�|||�t|||�td�tdd�tD��}tdd�tD��}td||||f�dS)NrrcSsg|]}t|r|�qSr�r"��.0r*rrr�
<listcomp>��ztest.<locals>.<listcomp>cSsg|]}t|s|�qSrrHrIrrrrK�rLz"%d kites and %d darts = %d pieces.)�gotor1r"rAr5�len�print)rr'�fun�startposr3ZnkZndrrr�test�s
rRcCsLt�td�D]}t�}td||�t�}||}|dkr#td|�qdS)N�i,r)rEr:�clockrRr)rPr<�a�b�trrr�demo�s��rXcCsjtd�tddd�tt�td�tt�td�tdd�tddd�td	d
dd�t	d
ddd�dS)NZlogog333333�?rrr.i8���gffffff�?rzPlease wait...�center)zArial Blackr
Zbold)ZalignZfontiXrS)�F�u)rQZDone)
�modeZbgcolorrXr=rr?ZpencolorrM�writerRrrrr�main�s
�r^�__main__N)r)�__doc__Zturtle�mathrr�timerrTrrr%rrr$r#r5r=r?rBrErRrXr^�__name__�msgZmainlooprrrr�<module>s,



�