Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/turtledemo/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/turtledemo/__pycache__/penrose.cpython-35.opt-2.pyc



���]�
�@sddlTddlmZmZddlmZmZd)Zded	ed
�Zdd�Z	d
d�Z
dd�Zdd�Zddd�Z
dd�Zdd�Zdd�Zdd�Zdded*ddd �Zed!d"�Zd#d$�Zed%kre�Ze�d&S)+�)�*)�cos�pi)�clock�sleep�g�?�g@���
cCsht|}td�t|�td�t|�td�t|�td�t|�td�dS)N�$�l�)�f�lt�fd�rt)�l�fl�r�,/opt/alt/python35/lib64/python3.5/penrose.py�kites








rcCsht|}td�t|�td�t|�td�t|�td�t|�td�dS)Nrr)rrrr)rrrrr�dart%s








rcCs|dkrat�\}}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)
Nrr
Trrr���)�pos�int�heading�round�tiledictrr�inflatedartrr�inflatekite�d)r�n�px�py�h�x�yrrrrr"1s(/








r"cCs�|dkrat�\}}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)
Nrr
Frrr�6�~r)rrrrr rr"rrrr!r#)rr$r%r&r'r(r)rrrrr!Gs"/






r!cCs�t�|t|}t|d|d|�xvtD]n}|\}}}t||�t|�t|r�td�tdd�ntd�tdd�t�q4WdS)	NgY@r�blackr��?r)rr-r)r-rr)	�clearrZ	shapesizer Zsetpos�
setheading�shapeZcolorZstamp)rr$�th�kr'r(r)rrr�drawZs






r3cCs2x+td�D]}t||�td�q
WdS)Nr�H)�ranger"r)rr$�irrr�sunjs
r7cCs2x+td�D]}t||�td�q
WdS)Nrr4)r5r!r)rr$r6rrr�staros
r8cCshtd�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>���c
Cs�t|�td�iat�}td�|||�t�}t|||�td�t�}td||�td||�td||�tdd�tD��}tdd�tD��}	td	||	||	f�dS)
NrrzCalculation:   %7.4f szDrawing:  %7.4f szTogether: %7.4f scSs g|]}t|r|�qSr)r )�.0r(rrr�
<listcomp>�s	ztest.<locals>.<listcomp>cSs g|]}t|s|�qSr)r )rAr(rrrrB�s	z"%d kites and %d darts = %d pieces.)�gotor/r rr:r3�print�len)
rr$�fun�startposr1�a�b�cZnkZndrrr�test�s 

	

	
	rKcCsht�xZtd�D]L}t�}td||�t�}||}|dkrtd|�qWdS)N�i,r	)r>r5rrKr)rFr6rHrI�trrr�demo�s		
rNcCs�td�tddd�tt�td�tt�td�tdd�tddd�td	d
ddd�t	dddd�dS)NZlogog333333�?rr	r,r?gffffff�?rzPlease wait...Zalign�centerZfont�Arial Blackr�boldiXrLrG�F�uZDonei8���)rPrrQ)rRrS)
�modeZbgcolorrNr7rr8ZpencolorrC�writerKrrrr�main�s





	
rV�__main__Ng��w�@gP�/7���?gP�/7���?)rr)Zturtle�mathrr�timerrrr#rrr"r!r3r7r8r;r>rKrNrV�__name__�msgZmainlooprrrr�<module>s&