ÿØÿà 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           @   s  d  Z  d d l Td d l m Z m Z d d l m Z m Z d d Z d	 e d
 e d  Z	 d   Z
 d   Z d   Z d   Z d	 d  Z d   Z d   Z d   Z d   Z d d e d d	 d  Z e d  Z d   Z e d k r e   Z e   n  d S(    s         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
 -------------------------------------------
i(   t   *(   t   cost   pi(   t   clockt   sleepi   g      ?i   g       @i   i   i
   c         C   sh   t  |  } t d  t |   t d  t |  t d  t |  t d  t |   t d  d  S(   Ni$   il   i   (   t   ft   ltt   fdt   rt(   t   lt   fl(    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   kite   s    








c         C   sh   t  |  } t d  t |   t d  t |  t d  t |  t d  t |   t d  d  S(   Ni$   i   (   R   R   R   R   (   R	   R
   (    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   dart%   s    








c         C   s  | d k ra t    \ } } t t    t | d  t | d  } } } t t | | | f <d  St |  } t d  t | | d  t	 |   t
 d  t | | d  t d  t	 |  t  t
 d  t | | d  t d  t	 |   t
 d  t | | d  t d  d  S(	   Ni    i   i$   i   i   i   i   i   (   t   post   intt   headingt   roundt   Truet   tiledictR   R   t   inflatedartR   R   t   inflatekitet   d(   R	   t   nt   pxt   pyt   ht   xt   yR
   (    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyR   1   s(    /








c         C   s   | d k ra t    \ } } t t    t | d  t | d  } } } t t | | | f <d  St |  } t | | d  t d  t	 |   t
 d  t | | d  t d  t	 |  t  t
 d  t | | d  t	 |   t
 d  d  S(	   Ni    i   i   i$   i   i6   i~   i   (   R   R   R   R   t   FalseR   R   R   R   R   R   R   R   (   R	   R   R   R   R   R   R   R
   (    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyR   G   s"    /






c         C   s   t    |  t | }  t |  d |  d |  xv t D]n } | \ } } } t | |  t |  t | r t d  t d d  n t d  t d d  t   q4 Wd  S(	   Ng      Y@R   t   blacki    g      ?R   (   i    g      ?i    (   g      ?i    i    (	   t   clearR   t	   shapesizeR   t   setpost
   setheadingt   shapet   colort   stamp(   R	   R   t   tht   kR   R   R   (    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   drawZ   s    



c         C   s2   x+ t  d  D] } t |  |  t d  q Wd  S(   Ni   iH   (   t   rangeR   R   (   R	   R   t   i(    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   sunj   s    c         C   s2   x+ t  d  D] } t |  |  t d  q Wd  S(   Ni   iH   (   R(   R   R   (   R	   R   R)   (    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   staro   s    c           C   sh   t  d  t   t d  t   t d t    t   t d  t   t d t    t  d  d  S(   Ni    id   R   R   i   (   t   tracert
   begin_polyR   t   end_polyt   register_shapet   get_polyR   (    (    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt
   makeshapest   s    


c           C   s*   t    t   t   t   t d  d  S(   Nt   user(   t   resett   htt   puR1   t
   resizemode(    (    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   start   s
    i   i   i    c         C   s   t  |  t d  i  a t   } t d  | |  |  t   } t |  | |  t d  t   } d | | GHd | | GHd | | GHt g  t D] } t | r | ^ q  }	 t g  t D] } t | s | ^ q  }
 d |	 |
 |	 |
 f GHd  S(   Ni    i   s   Calculation:   %7.4f ss   Drawing:  %7.4f ss   Together: %7.4f ss"   %d kites and %d darts = %d pieces.(   t   gotoR!   R   R   R,   R'   t   len(   R	   R   t   funt   startposR%   t   at   bt   cR   t   nkt   nd(    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   test   s     

	
	
	))c         C   sk   t    x] t d  D]O } t   } t d | |   t   } | | } | d k  r t d |  q q Wd  S(   Ni   i,  i   (   R7   R(   R   RA   R   (   R:   R)   R<   R=   t   t(    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   demo   s    		
c           C   s   t  d  t d d d  t t  t d  t t  t d  t d d  t d d d  t d	 d
 d d d t	 d d d d d S(   Nt   logog333333?i    i   R   i8gffffff?i   s   Please wait...t   alignt   centert   fonts   Arial Blacki$   t   boldiX  i   R;   iF   iu   t   Done(   s   Arial Blacki$   RH   (   iF   iu   (
   t   modet   bgcolorRC   R*   R   R+   t   pencolorR8   t   writeRA   (    (    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   main   s    




	t   __main__Ngw@gP/7?(   i    i    (   t   __doc__t   turtlet   mathR   R   t   timeR   R   R   R   R   R   R   R   R'   R*   R+   R1   R7   RA   RC   RN   t   __name__t   msgt   mainloop(    (    (    s1   /usr/lib64/python2.7/Demo/turtle/tdemo_penrose.pyt   <module>   s(   

								
		