<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
U
    e5dx  ã                   @   sX   d Z ddlmZmZ ddlmZ dd„ Zdd„ Zdd	„ Z	e
d
krTe	ƒ Zeeƒ eƒ  d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.
é    )ÚTurtleÚmainloop)Úperf_counterc                 c   sr   |dkrng }| D ]>}|  |¡ | ¡ }| |¡ | |¡ | |¡ | |¡ qt||| ||ƒD ]
}dV  qbdS )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)ÚforwardZcloneÚleftÚrightÚappendÚtree)ZplistÚlÚaÚfZlstÚpÚqÚx© r   ú'/usr/lib64/python3.8/turtledemo/tree.pyr
      s    



r
   c                  C   st   t ƒ } |  d ¡ |  ¡  |  d¡ |  ¡  dd¡ |  d¡ |  ¡  |  d¡ |  	¡  t
| gdddƒ}|D ]}qjd S )Nr   é   éZ   i.ÿÿÿéÈ   éA   gffffffä?)r   ZsetundobufferZ
hideturtleZspeedZ	getscreenZtracerr   Zpenupr   Zpendownr
   )r   Útr   r   r   r   Úmaketree'   s    



r   c                  C   s   t ƒ } tƒ  t ƒ }d||   S )Nzdone: %.2f sec.)Úclockr   )r   Úbr   r   r   Úmain5   s    r   Ú__main__N)Ú__doc__Zturtler   r   Útimer   r   r
   r   r   Ú__name__ÚmsgÚprintr   r   r   r   Ú<module>   s   