JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr Afc@sodZddlmZmZddlmZdZdZdZe dkrkeZ e GHendS( s turtle-example-suite: tdemo_tree.py Displays a 'breadth-first-tree' - in contrast to the classical Logo tree drawing programs, which use a depth-first-algorithm. Uses: (1) a tree-generator, where the drawing is quasi the side-effect, whereas the generator always yields None. (2) Turtle-cloning: At each branching point the current pen is cloned. So in the end there are 1024 turtles. i(tTurtletmainloop(tclockccs|dkrg}x[|D]S}|j||j}|j||j||j||j|qWx)t|||||D] }dVqWndS(s plist is list of pens l is length of branch a is half of the angle between 2 branches f is factor by which branch is shortened from level to level.iN(tforwardtclonetlefttrighttappendttreetNone(tplisttltatftlsttptqtx((s./usr/lib64/python2.7/Demo/turtle/tdemo_tree.pyRs        cCst}|jd|j|jd|jdd|jd|j|jd|j t |gddd}x|D]}qWt |j j GHdS(NiiiZi.iiAgffffff?(Rt setundobufferR t hideturtletspeedttracerRtpenupRtpendownRtlent getscreentturtles(RttR((s./usr/lib64/python2.7/Demo/turtle/tdemo_tree.pytmaketree's         cCs%t}tt}d||S(Nsdone: %.2f sec.(RR(R tb((s./usr/lib64/python2.7/Demo/turtle/tdemo_tree.pytmain6s  t__main__N( t__doc__tturtleRRttimeRRRRt__name__tmsg(((s./usr/lib64/python2.7/Demo/turtle/tdemo_tree.pyts