Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .fractals.py.swp
Binary file not shown.
Binary file added .whatsapp_automation.py.swp
Binary file not shown.
31 changes: 31 additions & 0 deletions fractal_tree.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

#python program for creating fractals
#install tkinter for it
#for debian based distribution
# sudo apt-get install python3-tk


import turtle

def tree(branchLen,t):
if branchLen > 2:
t.forward(branchLen)
t.right(20)
tree(branchLen-15,t)
t.left(40)
tree(branchLen-15,t)
t.right(20)
t.backward(branchLen)

def main():
t = turtle.Turtle()
myWin = turtle.Screen()
t.left(90)
t.up()
t.backward(100)
t.down()
t.color("green")
tree(75,t)
myWin.exitonclick()

main()