AlkantarClanX12

Your IP : 3.142.133.210


Current Path : /usr/lib64/python3.8/turtledemo/__pycache__/
Upload File :
Current File : //usr/lib64/python3.8/turtledemo/__pycache__/fractalcurves.cpython-38.opt-2.pyc

U

e5d�
�@sPddlTddlmZmZGdd�de�Zdd�ZedkrLe�Z	e
e	�e�dS)	�)�*)�sleep�perf_counterc@s$eZdZdd�Zdd�Zdd�ZdS)�CurvesTurtlecCs�|dkrdS|�|d�|�||d|�|�|�|�|d�|�||d|�|�|�|�||d|�|�|d�|�|�|�||d|�|�|d�dS)Nr�Z�)�left�hilbertZforward�right)�self�size�levelZparity�r�0/usr/lib64/python3.8/turtledemo/fractalcurves.pyr	s


zCurvesTurtle.hilbertcCs�ddl}d||�|j|�}|��|�|�|��|�dd|d|�t|�D] }|�|||�|�d|�q\|�	dd|d|�|��|�
|�|��dS)Nr��rih)�mathZsinZpi�pu�fd�pd�rt�range�fractal�ltZbk)r�nZradZlev�dirrZedge�irrr�
fractalgon/s

zCurvesTurtle.fractalgoncCs�|dkr|�|�dS|�|d|d|�|�d|�|�|d|d|�|�d|�|�|d|d|�|�d|�|�|d|d|�dS)Nr��<�x)rrrr)rZdistZdepthrrrrrBs
zCurvesTurtle.fractalN)�__name__�
__module__�__qualname__r	rrrrrrrsrcCs�t�}|��|�d�|��|���dd�|��d}|�d|d|�|��t	�}|�
d�|��|�|�|�
|dd�|�|�td�D]$}|�d�|�|d	|d
�q�|��td
�D]}|�|�|�d�q�|��td�D]$}|�|d|d
�|�d�q�|��t	�}d
||}td�|��|�d�|��|���dd�t	�}|�dd�|��|�dddd�|��|��|�d�|�dddd�|��t	�}|d||7}|S)Nrr�i���i��Zredrr�@r��BzHilbert: %.2fsec. ZblackZblue������zKoch: %.2fsec.)r�resetZspeedZhtZ	getscreenZtracerrZsetposr�clockZ	fillcolorZ
begin_fillrr	rrrZend_fillrZcolorr)ZftrZtar�tb�resrrr�mainNs\







r/�__main__N)Zturtle�timerrr,ZPenrr/r!�msg�printZmainlooprrrr�<module>s=9