+
     BiZ                     ~    R t ^ RI5 ^ RIHtHt  ! R R]4      tR t]	R8X  d   ]! 4       t
]! ]
4       ]! 4        R# R# )a  turtledemo/fractalcurves.py

This program draws two fractal-curve-designs:
(1) A hilbert curve (in a box)
(2) A combination of Koch-curves.

The CurvesTurtle class and the fractal-curve-
methods are taken from the PythonCard example
scripts for turtle-graphics.
)*)sleepperf_counterc                   2   a  ] tR t^t o R tR tR tRtV tR# )CurvesTurtlec                
   V^ 8X  d   R# V P                  V^Z,          4       V P                  W^,
          V) 4       V P                  V4       V P                  V^Z,          4       V P                  W^,
          V4       V P                  V4       V P                  W^,
          V4       V P                  V^Z,          4       V P                  V4       V P                  W^,
          V) 4       V P                  V^Z,          4       R# )    N)lefthilbertforwardright)selfsizelevelparitys   &&&&//usr/lib/python3.14/turtledemo/fractalcurves.pyr
   CurvesTurtle.hilbert   s    A:		&2+T19vg.T

6B;T19f-TT19f-

6B;TT19vg. 			&2+    c                ^   ^ RI p^V,          VP                  VP                  V,          4      ,          pV P                  4        V P	                  V4       V P                  4        V P                  ^^ZV^,
          ,          V,          ,
          4       \        V4       F-  pV P                  WcV4       V P                  RV,          4       K/  	  V P                  ^^ZV^,
          ,          V,          ,
          4       V P                  4        V P                  V4       V P                  4        R# )r   Nih  )mathsinpipufdpdrtrangefractalltbk)r   nradlevdirr   edgeis   &&&&&   r   
fractalgonCurvesTurtle.fractalgon,   s     3w$''A+..		rQU|a'()qALLC(GGC!G  	rQU|a'()		r   c                   V^8  d   V P                  V4       R# V P                  V^,          V^,
          V4       V P                  ^<V,          4       V P                  V^,          V^,
          V4       V P                  ^xV,          4       V P                  V^,          V^,
          V4       V P                  ^<V,          4       V P                  V^,          V^,
          V4       R# )   N)r   r   r   r   )r   distdepthr#   s   &&&&r   r   CurvesTurtle.fractal?   s    19GGDMTAXuqy#.STAXuqy#.c	TAXuqy#.STAXuqy#.r    N)	__name__
__module____qualname____firstlineno__r
   r&   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s     
2&
/ 
/r   r   c                  @   \        4       p V P                  4        V P                  ^ 4       V P                  4        V P	                  4       P                  ^^ 4       V P                  4        ^pV P                  RV,          RV,          4       V P                  4        \        4       pV P                  R4       V P                  4        V P                  V4       V P                  V^^4       V P                  V4       \        ^4       F:  pV P                  ^Z4       V P                  V^@V^,          ,           ,          4       K<  	  V P                  4        \        ^4       F%  pV P                  V4       V P!                  ^Z4       K'  	  V P                  4        \        ^4       F:  pV P                  V^BV^,          ,           ,          4       V P!                  ^Z4       K<  	  V P#                  4        \        4       pRWB,
          ,          p\%        ^4       V P                  4        V P                  ^ 4       V P                  4        V P	                  4       P                  ^^ 4       \        4       pV P'                  RR4       V P                  4        V P)                  ^^^^4       V P#                  4        V P                  4        V P'                  R4       V P)                  ^^^R4       V P#                  4        \        4       pVRWB,
          ,          ,          pV# )	r   redzHilbert: %.2fsec. blackbluezKoch: %.2fsec.ii)r   resetspeedht	getscreentracerr   setposr   clock	fillcolor
begin_fillr   r
   r   r   r   end_fillr   colorr&   )ftr   tar%   tbress         r   mainrI   K   s'   	BHHJHHQKEEGLLN!AEEGDIIc$hD!EEGwBLLMMOEE$KJJtQ EE$K1X
b	
dBqsFm  EEG1X
d
b	  EEG1X
dBqsFm
b	  KKMwB25)C	!HHHJHHQKEEGLLN!AwBHHWfMMOMM!S!QKKMMMOHHUOMM!S!R KKMwB&&CJr   __main__N)__doc__turtletimer   r   r@   Penr   rI   r.   msgprintmainloopr-   r   r   <module>rR      sG   	  -;/3 ;/z7r 

&C	#JJ r   