asda?‰PNG  IHDR ? f ??C1 sRGB ??é gAMA ±? üa pHYs ? ??o¨d GIDATx^íüL”÷e÷Y?a?("Bh?_ò???¢§?q5k?*:t0A-o??¥]VkJ¢M??f?±8\k2íll£1]q?ù???T a bYhy@sXdZddlmZmZddlmZddZddZdd Z e d krTe Z e e ed S) a 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. )Turtlemainloop) perf_counterccsr|dkrng}|D]>}|||}||||||||qt|||||D] }dVqbdS)z 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.N)forwardZcloneleftrightappendtree)ZplistlafZlstpqxr+/usr/local/lib/python3.9/turtledemo/tree.pyr s     r cCstt}|d||d|dd|d||d| t |gddd}|D]}qjdS)NrZi.Agffffff?) rZ setundobufferZ hideturtleZspeedZ getscreenZtracerrZpenuprZpendownr )rtrrrrmaketree's    rcCst}tt}d||S)Nzdone: %.2f sec.)clockr)r brrrmain5sr__main__N) __doc__Zturtlerrtimerrr rr__name__msgprintrrrrs