# Bob Dylan

All

I created this post a long time ago, when the Nobel prize was annouced and before Bob refusing to go there.

### Well, here comes the hystory of a hurricane! Congrats Dylan! You’re just great

Python Fractal from 

import turtle
PROGNAME = ‘Sierpinski Triangle’
#Credits: This code was written by editing the code from http://www.lpb-riannetrujillo.com/blog/python-fractal/

myPen = turtle.Turtle()
myPen.ht()
myPen.speed(5)
myPen.pencolor(‘orange’)

points = [[-175,-125],[0,175],[175,-125]] #size of triangle

def getMid(p1,p2):
return ( (p1+p2) / 2, (p1 + p2) / 2) #find midpoint

def triangle(points,depth):

myPen.up()
myPen.goto(points,points)
myPen.down()
myPen.goto(points,points)
myPen.goto(points,points)
myPen.goto(points,points)

if depth>0:
triangle([points,
getMid(points, points),
getMid(points, points)],
depth-1)
triangle([points,
getMid(points, points),
getMid(points, points)],
depth-1)
triangle([points,
getMid(points, points),
getMid(points, points)],
depth-1)
triangle(points,4)

### REFs

http://www.101computing.net/python-fractals/