ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
Afc           @   sS   d  Z  d d l Td   Z d   Z d   Z e d k rO e   Z e GHe   n  d S(   s         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(   t   *c         C   sN   xG t  |  D]9 } d } x$ |  D] } | | j | |  } q  W| }  q W|  S(   Nt    (   t   ranget   get(   t   seqt   replacementRulest   nt   it   newseqt   element(    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyt   replace   s    
c         C   sW   xP |  D]H } y | |   Wq t  k
 rN y t | | |  WqO qO Xq Xq Wd  S(   N(   t	   TypeErrort   draw(   t   commandst   rulest   b(    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyR   &   s    c          C   sr  d   }  d   } d   } i |  d 6| d 6| d 6d d 6} i d	 d 6} d
 } t  | | d  } t   t d  t d d  t   t   t d  t   t | |  d d l	 m
 } | d  d   } d   }	 d   }
 i | d 6|	 d 6|
 d 6} i d d 6d d 6} d } t   t d  t d d  t   t d  t  | | d  } t | |  t d  d S(   Nc           S   s   t  d  d  S(   Ni-   (   t   right(    (    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyt   r7   s    c           S   s   t  d  d  S(   Ni-   (   t   left(    (    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyt   l:   s    c           S   s   t  d  d  S(   Ng      @(   t   forward(    (    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyt   f=   s    t   -t   +R   s   f+f+f--f--f+f+fR   s   b+f+b--f--b+f+bs
   b--f--b--fi   i   i    i   i(   t   sleepc           S   s   t  d  t d d  d  S(   Nt   redi
   iZ   (   t   colort   circle(    (    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyt   AV   s    
c          S   sO   d d l  m }  t d  d |  d  } t |  t | d  t |  d  S(   Ni(   t   sqrtt   blacki   i   i  (   t   mathR   R   R   R   (   R   R   (    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyt   BZ   s    

c           S   s   t  d  t d  d  S(   Nt   greeni
   (   R   R   (    (    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyt   Fb   s    
t   at   afbfat	   afbfbfbfat   fbfbfbfbi-   s   Done!(   R
   t   resett   speedt   tracert   htt   upt   backwardt   downR   t   timeR   R   (   R   R   R   t   snake_rulest   snake_replacementRulest   snake_startt   drawingR   R   R    R"   t   krishna_rulest   krishna_replacementRulest   krishna_start(    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyt   main1   s@    			"


			


t   __main__N(   t   __doc__t   turtleR
   R   R6   t   __name__t   msgt   mainloop(    (    (    s<   /usr/lib64/python2.7/Demo/turtle/tdemo_lindenmayer_indian.pyt   <module>   s   
			C	