File "tdemo_fractalcurves.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/usr/lib64/python2.7/Demo/turtle/tdemo_fractalcurves.pyc
File size: 3.44 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


Afc@smdZddlTddlmZmZdefdYZdZedkrieZ	e	GHe
ndS(	s&      turtle-example-suite:

        tdemo_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.
i(t*(tsleeptclocktCurvesTurtlecBs#eZdZdZdZRS(cCs|dkrdS|j|d|j||d||j||j|d|j||d||j||j||d||j|d|j||j||d||j|ddS(NiiZi(tleftthilberttforwardtright(tselftsizetleveltparity((s7/usr/lib64/python2.7/Demo/turtle/tdemo_fractalcurves.pyRs


cCsddl}d||j|j|}|j|j||j|jdd|d|x8t|D]*}|j||||jd|quW|j	dd|d||j|j
||jdS(NiiiiZih(tmathtsintpitputfdtpdtrttrangetfractaltlttbk(RtntradtlevtdirRtedgeti((s7/usr/lib64/python2.7/Demo/turtle/tdemo_fractalcurves.pyt
fractalgon/s




cCs|dkr|j|dS|j|d|d||jd||j|d|d||jd||j|d|d||jd||j|d|d|dS(Niii<ix(RRRR(RtdisttdepthR((s7/usr/lib64/python2.7/Demo/turtle/tdemo_fractalcurves.pyRBs
(t__name__t
__module__RRR(((s7/usr/lib64/python2.7/Demo/turtle/tdemo_fractalcurves.pyRs		cCsrt}|j|jd|j|jdd|jd}|jd|d||jt}|j	d|j
t|j||j
|dd|j|x:tdD],}|jd|j|d	|d
qW|jx.td
D] }|j||jdqW|jx:tdD],}|j|d|d
|jdqKW|j
tt}d
||}td|j|jd|j|jddt}|jdd|j
t|jdddd|j
t|jd|jdddd|j
tt}|d||7}|S(NiiiiitrediiZi@iiiBsHilbert: %.2fsec. tblacktblueiiisKoch: %.2fsec.(RtresettspeedthtttracerRtsetposRRt	fillcolortfilltTrueRRRRRtFalseRtcolorR(tftR	ttaRttbtres((s7/usr/lib64/python2.7/Demo/turtle/tdemo_fractalcurves.pytmainNsZ	




	








	



	



	t__main__N(t__doc__tturtlettimeRRtPenRR3R tmsgtmainloop(((s7/usr/lib64/python2.7/Demo/turtle/tdemo_fractalcurves.pyt<module>
s
=	8