Your IP : 216.73.216.213


Current Path : /opt/alt/python33/lib64/python3.3/turtledemo/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/turtledemo/__pycache__/lindenmayer.cpython-33.pyo

�
��f�	c@sadZddlTdd�Zdd�Zdd�Zed	kr]e�Zee�e�nd
S(u�       turtle-example-suite:

        xtx_lindenmayer_indian.py

Each morning women in Tamil Nadu, in southern
India, place designs, created by using rice
flour and known as kolam on the thresholds of
their homes.

These can be described by Lindenmayer systems,
which can easily be implemented with turtle
graphics and Python.

Two examples are shown here:
(1) the snake kolam
(2) anklets of Krishna

Taken from Marcia Ascher: Mathematics
Elsewhere, An Exploration of Ideas Across
Cultures

i(u*cCsNxGt|�D]9}d}x$|D]}||j||�}q W|}q
W|S(Nu(urangeuget(usequreplacementRulesunuiunewsequelement((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyureplaces

ureplacecCsYxR|D]J}y||�Wqtk
rPyt|||�WnYnXYqXqWdS(N(u	TypeErrorudraw(ucommandsurulesub((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyudraw&s

udrawcCs�dd�}dd�}dd�}i|d6|d6|d	6d
d6}idd6}d
}t||d�}t�td�tdd�t�t�td�t�t||�ddl	m
}|d�dd�}dd�}	dd�}
i|d6|	d6|
d	6}idd6dd6}d}
t�td�tdd�t�td�t|
|d�}t||�td�dS(NcSstd�dS(Ni-(uright(((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyur7sumain.<locals>.rcSstd�dS(Ni-(uleft(((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyul:sumain.<locals>.lcSstd�dS(Ng@(uforward(((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyuf=sumain.<locals>.fu-u+ufuf+f+f--f--f+f+fubub+f+b--f--b+f+bu
b--f--b--fiiii�(usleepcSstd�tdd�dS(Nuredi
iZ(ucolorucircle(((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyuAVs
umain.<locals>.AcSsOddlm}td�d|d�}t|�t|d�t|�dS(Ni(usqrtublackiii(umathusqrtucoloruforwarducircle(usqrtul((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyuBZs


umain.<locals>.BcSstd�td�dS(Nugreeni
(ucoloruforward(((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyuFbs
umain.<locals>.Fuauafbfau	afbfbfbfaufbfbfbfbi-uDone!(ureplaceuresetuspeedutraceruhtuupubackwardudownudrawutimeusleepuleft(urulufusnake_rulesusnake_replacementRulesusnake_startudrawingusleepuAuBuFu
krishna_rulesukrishna_replacementRulesu
krishna_start((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyumain1s@"










umainu__main__N(	u__doc__uturtleureplaceudrawumainu__name__umsguprintumainloop(((u;/opt/alt/python33/lib64/python3.3/turtledemo/lindenmayer.pyu<module>s
C