+
     Bi                         R t ^ RI5 ^ RIHtHt ^ RIHtHt Rt	^]! ^],          ^
,          4      ,          t
R tR tR tR tRR ltR	 tR
 tR tR t^^]R^3R lt]3R ltR t]R8X  d   ]! 4       t]! 4        R# R# )ae  turtledemo/penrose.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:
 https://en.wikipedia.org/wiki/Penrose_tiling
 -------------------------------------------
)*)cospi)perf_countersleepc                     \         V ,          p\        ^$4       \        V 4       \        ^l4       \        V4       \        ^$4       \        V4       \        ^l4       \        V 4       \        ^4       R# $   Nfltfdrtlfls   & )/usr/lib/python3.14/turtledemo/penrose.pykiter      J    	
QBrFqEsGrFrFrFsGqEsG    c                     \         V ,          p\        ^$4       \        V 4       \        ^4       \        V4       \        ^$4       \        V4       \        ^4       \        V 4       \        ^4       R# r   r
   r   s   & r   dartr   "   r   r   c                 6   V^ 8X  dD   \        4       w  r#\        \        4       4      \        V^4      \        V^4      repR\        WEV3&   R# \
        V ,          p\        ^$4       \        Wq^,
          4       \        V 4       \        ^4       \        Wq^,
          4       \        ^4       \        V \        ,          4       \        ^4       \        Wq^,
          4       \        ^$4       \        V 4       \        ^4       \        Wq^,
          4       \        ^$4       R# )    TN)posintheadingroundtiledictr   r   inflatedartr   r   inflatekitedr   npxpyhxyr   s   &&      r   r    r    .   s    Avgi.%1+uR{a !a	
QBrFaCqEsGaCrFqsGsGaCrFqEsGaCrFr   c                    V^ 8X  dD   \        4       w  r#\        \        4       4      \        V^4      \        V^4      repR\        WEV3&   R# \
        V ,          p\        Wq^,
          4       \        ^$4       \        V 4       \        ^4       \        Wq^,
          4       \        ^64       \        V \        ,          4       \        ^~4       \        Wq^,
          4       \        V 4       \        ^4       R# )r   FN)r   r   r   r   r   r   r    r   r   r   r   r!   r"   s   &&      r   r   r   D   s    Avgi.%1+uR{a!!a	
QBaCrFqEsGaCrFqsGsGaCqEsGr   c                 `   \        4        V \        V,          ,          p \        V R ,          V R ,          V4       \         Fj  pVw  rEp\	        WV4       \        V4       \        V,          '       d   \        R4       \        RR4       M\        R4       \        RR4       \        4        Kl  	  R# )g      Y@r   blackr   N)r         ?r   )r,   r   r   )	clearr   	shapesizer   setpos
setheadingshapecolorstamp)r   r#   thkr&   r'   r(   s   &&&    r   drawr6   W   sy    	G	AqDAagqw#aq1A;;&M'<(&M'<( r   c                 V    \        ^4       F  p\        W4       \        ^H4       K  	  R#    N)ranger    r   r   r#   is   && r   sunr=   g       1XA
2 r   c                 V    \        ^4       F  p\        W4       \        ^H4       K  	  R# r8   )r:   r   r   r;   s   && r   starr@   l   r>   r   c                      \        ^ 4       \        4        \        ^d4       \        4        \	        R\        4       4       \        4        \        ^d4       \        4        \	        R\        4       4       \        ^4       R# )r   r   r   N)tracer
begin_polyr   end_polyregister_shapeget_polyr    r   r   
makeshapesrH   q   sJ    
1ILIJ68:&LIJ68:&
1Ir   c                  l    \        4        \        4        \        4        \        4        \	        R 4       R# )userN)resethtpurH   
resizemoderG   r   r   startrO   }   s    	GDDLvr   c                    \        V4       \        ^ 4       / s\        ^ 4       V! W4       \	        WV4       \        ^4       \        \         Uu. uF  p\        V,          '       g   K  VNK  	  up4      p\        \         Uu. uF  p\        V,          '       d   K  VNK  	  up4      p\        RWgWg,           3,          4       R# u upi u upi )r   z"%d kites and %d darts = %d pieces.N)gotor0   r   rB   r6   lenprint)r   r#   funstartposr4   r'   nknds   &&&&&   r   testrX      s    NqMH
1IIrN
1I	1AXa[[aa1	2B	5A!aa5	6B	
.""%
@A 25s   C*CCCc                     \        4        \        ^4       FF  p\        4       p\        RW4       \        4       pW2,
          pV^8  g   K4  \	        ^V,
          4       KH  	  R# )   i,  N)rO   r:   clockrX   r   )rT   r<   abts   &    r   demor_      sF    	G1XGS!GEq5!a%L r   c                     \        R 4       \        RR^ 4       \        \        4       \	        ^4       \        \
        4       \        R4       \        ^ R
4       \        RR^4       \        RRRR7       \        R^RR7       R	# )logog333333?r+   gffffff?zPlease wait...center)alignfontiX  )rU   Donei8)zArial Blackr	   bold)F   u   )
modebgcolorr_   r=   r   r@   pencolorrQ   writerX   rG   r   r   mainrm      sg    LCaI	!HJW4LSQ	
:<a)$r   __main__NgP/7?)   )r   r   )__doc__turtlemathr   r   timer   r[   r   r   r!   r   r   r    r   r6   r=   r@   rH   rO   rX   r_   rm   __name__msgmainlooprG   r   r   <module>rw      s      -AbDG

,& 


 !u B   z
&CJ r   