Skip to main content
Aleksandr Drozd
  • Publications
  • Curriculum Vitae
    • listings
    • cf.py

    cf.py (Source)

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    from contextfree.contextfree import *
    @check_limits
    def branch():
        line(0, 1)
        with translate(0, 0.9):
            with scale(0.7 + rnd(0.3)):
                with rotate(-0.4 + rnd(0.5)):
                    branch()
                with rotate(0.4 + rnd(0.5)):
                    branch()
    init(canvas_size=(300, 300))
    with translate(0, -1):
        with scale(0.6):
            branch()
    display_ipython()
    
    Maintained by Aleksandr Drozd